Skip to content

Commit 8e421c9

Browse files
authored
Merge pull request #41 from DaleStudy/fix/usage-table-pr-autolink
fix: API μ‚¬μš©λŸ‰ ν‘œ μš”μ²­ λ²ˆν˜Έμ—μ„œ # 제거 (PR μžλ™ 링크 νšŒν”Ό)
2 parents a94df05 + 7ef45a3 commit 8e421c9

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)