Skip to content

Commit 7ef45a3

Browse files
soobingclaudesounmind
committed
fix: API 사용량 표 요청 번호에서 # 제거 (PR 자동 링크 회피)
`#1`, `#2` 형태가 GitHub의 PR/issue 자동 링크 대상이 되어 실제 PR #1, #2 로 잘못 연결되던 문제. 헤더가 이미 "요청"이라 의미가 분명하므로 숫자만 표기한다. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Co-Authored-By: sounmind <37020415+sounmind@users.noreply.github.com>
1 parent a94df05 commit 7ef45a3

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

tests/learningComment.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ describe("upsertLearningStatusComment — usage history accumulation", () => {
5050

5151
const body = parseBody(post);
5252
expect(body).toContain("🔢 API 사용량 (gpt-4.1-nano)");
53-
expect(body).toContain("| #1 | 100 | 50 | 150 |");
53+
expect(body).toContain("| 1 | 100 | 50 | 150 |");
5454
// single-row history => no totals row
5555
expect(body).not.toContain("**합계**");
5656
// hidden marker stores an array
@@ -99,9 +99,9 @@ describe("upsertLearningStatusComment — usage history accumulation", () => {
9999

100100
const body = parseBody(patch);
101101
// all three calls present, in order
102-
expect(body).toContain("| #1 | 100 | 50 | 150 |");
103-
expect(body).toContain("| #2 | 200 | 80 | 280 |");
104-
expect(body).toContain("| #3 | 300 | 120 | 420 |");
102+
expect(body).toContain("| 1 | 100 | 50 | 150 |");
103+
expect(body).toContain("| 2 | 200 | 80 | 280 |");
104+
expect(body).toContain("| 3 | 300 | 120 | 420 |");
105105
// totals row appears once history.length > 1
106106
expect(body).toContain("| **합계** | **600** | **250** | **850** |");
107107
// marker is rewritten with the full array
@@ -146,7 +146,7 @@ describe("upsertLearningStatusComment — usage history accumulation", () => {
146146
const patch = calls.find((c) => c.init.method === "PATCH");
147147
const body = parseBody(patch);
148148

149-
expect(body).toContain("| #1 | 999 | 111 | 1,110 |");
149+
expect(body).toContain("| 1 | 999 | 111 | 1,110 |");
150150
expect(body).not.toContain("**합계**");
151151

152152
globalThis.fetch = originalFetch;

utils/learningComment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ function formatUsageSection(history) {
8484
const { prompt, completion } = history[i];
8585
const total = prompt + completion;
8686
const cost = calcCost(prompt, completion);
87-
lines.push(`| #${i + 1} | ${fmt(prompt)} | ${fmt(completion)} | ${fmt(total)} | $${cost.toFixed(6)} |`);
87+
lines.push(`| ${i + 1} | ${fmt(prompt)} | ${fmt(completion)} | ${fmt(total)} | $${cost.toFixed(6)} |`);
8888
totalPrompt += prompt;
8989
totalCompletion += completion;
9090
}

0 commit comments

Comments
 (0)