claude-code-kr 0.3.7 → 0.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -186,6 +186,7 @@
186
186
  "\"System prompt\"": "\"시스템 프롬프트\"",
187
187
  "\"Tab ID to identify which tab group this operation applies to\"": "\"이 작업이 적용될 탭 그룹을 식별하기 위한 탭 ID\"",
188
188
  "\"Theme\"": "\"테마\"",
189
+ "\"Thinking a bit longer… still working on it…\"": "\"조금 더 생각하는 중… 계속 진행 중…\"",
189
190
  "\"Thinking mode\"": "\"사고 모드\"",
190
191
  "\"Tips for getting started\"": "\"시작 가이드\"",
191
192
  "\"Try again\"": "\"다시 시도\"",
package/lib/patcher.js CHANGED
@@ -206,6 +206,17 @@ function apply(cliJs, { force = false } = {}) {
206
206
  const stableResult = applyPatchList(content, stablePatches);
207
207
  content = stableResult.content;
208
208
 
209
+ // 동적 패치 — 런타임 정보(cckr 버전) 주입
210
+ // welcome banner에 cckr 버전 표시
211
+ const cckrTag = `cckr ${pkg.version}`;
212
+ const dynamicPatches = [
213
+ ['"다시 오셨네요!"', `"다시 오셨네요! [${cckrTag}]"`],
214
+ ['"Claude Code에 오신 것을 환영합니다"', `"Claude Code에 오신 것을 환영합니다 [${cckrTag}]"`],
215
+ ];
216
+ for (const [old, rep] of dynamicPatches) {
217
+ if (content.includes(old)) content = content.replaceAll(old, rep);
218
+ }
219
+
209
220
  fs.writeFileSync(cliJs, content);
210
221
 
211
222
  // syntax 검증 — 패치가 깨진 JS를 만들었는지 확인
@@ -110,6 +110,23 @@ const patches = [
110
110
  [/if\((\w+)<60000\)return`\$\{Math\.round\(\1\/1000\)\}s`;let (\w+)=Math\.floor\(\1\/60000\),(\w+)=Math\.round\(\1%60000\/1000\);return \3>0\?`\$\{\2\}m \$\{\3\}s`:`\$\{\2\}m`/,
111
111
  'if($1<60000)return`${Math.round($1/1000)}초`;let $2=Math.floor($1/60000),$3=Math.round($1%60000/1000);return $3>0?`${$2}분 ${$3}초`:`${$2}분`'],
112
112
 
113
+ // formatDuration (E5)의 < 60s 분기
114
+ // if(q<60000){if(q===0)return"0s";if(q<1)return`${(q/1000).toFixed(1)}s`;return`${Math.floor(q/1000).toString()}s`}
115
+ [/if\((\w+)<60000\)\{if\(\1===0\)return"0s";if\(\1<1\)return`\$\{\(\1\/1000\)\.toFixed\(1\)\}s`;return`\$\{Math\.floor\(\1\/1000\)\.toString\(\)\}s`\}/,
116
+ 'if($1<60000){if($1===0)return"0초";if($1<1)return`${($1/1000).toFixed(1)}초`;return`${Math.floor($1/1000).toString()}초`}'],
117
+
118
+ // 인라인 ms/s/m ternary (D<1000?`${D}ms`:D<60000?`${Math.floor(D/1000)}s`:...)
119
+ [/(\w+)<1000\?`\$\{\1\}ms`:\1<60000\?`\$\{Math\.floor\(\1\/1000\)\}s`:`\$\{Math\.floor\(\1\/60000\)\}m \$\{Math\.floor\(\1%60000\/1000\)\}s`/,
120
+ '$1<1000?`${$1}밀리초`:$1<60000?`${Math.floor($1/1000)}초`:`${Math.floor($1/60000)}분 ${Math.floor($1%60000/1000)}초`'],
121
+
122
+ // 도구 실행/연결 시간 표시 — Math.floor(var/1000)}s 형식
123
+ // 컨텍스트별로 안전하게 매칭
124
+ [/(\w+)=`\$\{Math\.floor\((\w+)\/1000\)\}s`;F8/g, '$1=`${Math.floor($2/1000)}초`;F8'],
125
+ [/\$\{Math\.floor\((\w+)\/1000\)\}s \(\$\{/g, '${Math.floor($1/1000)}초 (${'],
126
+ [/\$\{Math\.floor\((\w+)\/1000\)\}s: \$\{/g, '${Math.floor($1/1000)}초: ${'],
127
+ [/\$\{Math\.floor\((\w+)\/1000\)\}s`,"MCP/g, '${Math.floor($1/1000)}초`,"MCP'],
128
+ [/\$\{Math\.floor\((\w+)\/1000\)\}s uptime`/g, '${Math.floor($1/1000)}초 가동`'],
129
+
113
130
  // formatNumber compact — "1.3k" → "1.3천", "1.3M" → "130만", "1B" → "10억"
114
131
  // Intl.NumberFormat의 locale을 ko로 바꿈
115
132
  ['new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1,minimumFractionDigits:1})',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-kr",
3
- "version": "0.3.7",
3
+ "version": "0.3.9",
4
4
  "description": "Claude Code 한글 패치 CLI — /btw → /근데, /help → /도움, /compact → /압축",
5
5
  "main": "./index.js",
6
6
  "bin": {