Skip to content

Commit 92f8ca1

Browse files
soobingsounmindclaude
committed
fix: 코드 리뷰 반영 - 스텝 번호 수정 및 usage null 안전 처리
- learning-status.js: 스텝 5 중복을 5~9로 순번 재정렬 - openai.js: 단건 위임 시 result.usage ?? null로 undefined 방지 Co-Authored-By: sounmind <37020415+sounmind@users.noreply.github.com> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 03e9d9d commit 92f8ca1

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

handlers/learning-status.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,11 @@ export async function postLearningStatus(
184184

185185
const hasUsage = totalUsage != null;
186186

187-
// 5. 카테고리별 진행도 계산
187+
// 6. 카테고리별 진행도 계산
188188
const totalProblems = Object.keys(categories).length;
189189
const categoryProgress = buildCategoryProgress(categories, solvedProblems);
190190

191-
// 6. 댓글 본문 포맷
191+
// 7. 댓글 본문 포맷
192192
const commentBody = formatLearningStatusComment(
193193
username,
194194
submissionResults,
@@ -197,7 +197,7 @@ export async function postLearningStatus(
197197
categoryProgress
198198
);
199199

200-
// 7. 댓글 생성 또는 업데이트
200+
// 8. 댓글 생성 또는 업데이트
201201
await upsertLearningStatusComment(
202202
repoOwner,
203203
repoName,
@@ -207,7 +207,7 @@ export async function postLearningStatus(
207207
hasUsage ? totalUsage : null
208208
);
209209

210-
// 8. 결과 반환
210+
// 9. 결과 반환
211211
const matchedCount = submissionResults.filter((r) => r.matches === true).length;
212212
return { analyzed: submissionResults.length, matched: matchedCount };
213213
}

utils/openai.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ export async function generateBatchApproachAnalysis(items, apiKey) {
275275
const result = await generateApproachAnalysis(fileContent, problemName, problemInfo, apiKey);
276276
return {
277277
results: [{ matches: result.matches, explanation: result.explanation }],
278-
usage: result.usage,
278+
usage: result.usage ?? null,
279279
};
280280
}
281281

0 commit comments

Comments
 (0)