codemini-cli 0.5.11 → 0.5.12

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.
@@ -0,0 +1 @@
1
+ import{i as e}from"./index-DIGUEzan.js";export{e as Mermaid};
@@ -7,14 +7,26 @@
7
7
  <link rel="icon" type="image/x-icon" href="/favicon.ico" />
8
8
  <script>
9
9
  (() => {
10
- const stored = localStorage.getItem('codemini-theme');
10
+ const mq = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)');
11
+ function applyTheme() {
12
+ const stored = localStorage.getItem('codemini-theme');
13
+ const isAuto = !stored || stored === 'auto';
14
+ const prefersDark = mq && mq.matches;
15
+ const resolved = isAuto ? (prefersDark ? 'dark' : 'light') : stored;
16
+ document.documentElement.dataset.theme = resolved;
17
+ }
18
+ applyTheme();
11
19
  const palette = localStorage.getItem('codemini-theme-palette') || 'default';
12
- const prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
13
- document.documentElement.dataset.theme = stored || (prefersDark ? 'dark' : 'light');
14
20
  document.documentElement.dataset.palette = palette;
21
+ if (mq) {
22
+ mq.addEventListener('change', () => {
23
+ const stored = localStorage.getItem('codemini-theme');
24
+ if (!stored || stored === 'auto') applyTheme();
25
+ });
26
+ }
15
27
  })();
16
28
  </script>
17
- <script type="module" crossorigin src="/assets/index-B71xykPM.js"></script>
29
+ <script type="module" crossorigin src="/assets/index-DIGUEzan.js"></script>
18
30
  <link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-S-ySWqyJ.js">
19
31
  <link rel="stylesheet" crossorigin href="/assets/index-Dkq1DdDX.css">
20
32
  </head>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "codemini-cli",
3
- "version": "0.5.11",
4
- "description": "Coding CLI optimized for small-model workflows and Windows PowerShell",
3
+ "version": "0.5.12",
4
+ "description": "An extremely restrained coding + tasks CLI. Every platform. Every terminal. Minimal by design.",
5
5
  "keywords": [
6
6
  "cli",
7
7
  "ai",
@@ -214,10 +214,11 @@ function getNested(obj, keyPath) {
214
214
  return keyPath.split('.').reduce((acc, k) => (acc && k in acc ? acc[k] : undefined), obj);
215
215
  }
216
216
 
217
- function parseValue(input) {
218
- if (input === 'true') return true;
219
- if (input === 'false') return false;
220
- if (input === 'null') return null;
217
+ function parseValue(input) {
218
+ if (typeof input !== 'string') return input;
219
+ if (input === 'true') return true;
220
+ if (input === 'false') return false;
221
+ if (input === 'null') return null;
221
222
  if ((input.startsWith('[') && input.endsWith(']')) || (input.startsWith('{') && input.endsWith('}'))) {
222
223
  try {
223
224
  return JSON.parse(input);
@@ -270,6 +270,7 @@ const TUI_COPY = {
270
270
  skillCompleted: '技能已完成',
271
271
  skillFailed: '技能执行失败',
272
272
  autoSkillInjected: (names) => `自动启用技能: ${names.map((name) => `/${name}`).join(', ')}`,
273
+ contextLabel: '上下文',
273
274
  compactingContext: '正在压缩上下文',
274
275
  autoCompactTriggered: (mode, threshold) => `自动压缩已触发(${mode},阈值 ${threshold}%)`,
275
276
  requestFailed: '请求失败',
@@ -497,6 +498,7 @@ const TUI_COPY = {
497
498
  skillCompleted: 'skill completed',
498
499
  skillFailed: 'skill failed',
499
500
  autoSkillInjected: (names) => `auto-enabled skills: ${names.map((name) => `/${name}`).join(', ')}`,
501
+ contextLabel: 'Context',
500
502
  compactingContext: 'compacting context',
501
503
  autoCompactTriggered: (mode, threshold) => `auto-compact triggered (${mode}, threshold ${threshold}%)`,
502
504
  requestFailed: 'request failed',
@@ -1444,7 +1446,7 @@ function RuntimeStrip({ busy, runtimeStatus, loaderTick, copy }) {
1444
1446
  );
1445
1447
  }
1446
1448
 
1447
- function ContextProgressMeter({ runtimeState, runtimeStatus, compact = false }) {
1449
+ function ContextProgressMeter({ runtimeState, runtimeStatus, compact = false, copy }) {
1448
1450
  const maxContextTokens = Number(runtimeState?.maxContextTokens || 0);
1449
1451
  const currentContextTokens = Number(runtimeState?.currentContextTokens || 0);
1450
1452
  const pctRaw =
@@ -1466,7 +1468,7 @@ function ContextProgressMeter({ runtimeState, runtimeStatus, compact = false })
1466
1468
  return h(
1467
1469
  Box,
1468
1470
  { justifyContent: 'flex-end', alignItems: 'center' },
1469
- h(Text, { color: 'gray' }, '上下文 '),
1471
+ h(Text, { color: 'gray' }, `${copy?.runtime?.contextLabel ?? '上下文'} `),
1470
1472
  h(Text, { color: activeColor }, `${Math.round(pct)}% `),
1471
1473
  h(
1472
1474
  Box,
@@ -1479,7 +1481,7 @@ function ContextProgressMeter({ runtimeState, runtimeStatus, compact = false })
1479
1481
  return h(
1480
1482
  Box,
1481
1483
  { justifyContent: 'flex-end', alignItems: 'center' },
1482
- h(Text, { color: 'gray' }, '上下文 '),
1484
+ h(Text, { color: 'gray' }, `${copy?.runtime?.contextLabel ?? '上下文'} `),
1483
1485
  h(Text, { color: activeColor }, `${Math.round(pct)}% `),
1484
1486
  h(
1485
1487
  Box,
@@ -1573,7 +1575,7 @@ function Header({ sessionId, model, sdkProvider, shellName, safeMode = true }) {
1573
1575
  )
1574
1576
  ),
1575
1577
  h(Box, { height: 1 }),
1576
- h(Text, { color: 'gray' }, 'optimized for small-model workflows'),
1578
+ h(Text, { color: 'gray' }, 'An extremely restrained coding + tasks CLI. Every platform. Every terminal. Minimal by design.'),
1577
1579
  h(Box, { height: 1 }),
1578
1580
  h(
1579
1581
  Box,
@@ -5111,7 +5113,7 @@ export function ChatApp({ runtime, sessionId, model, sdkProvider = 'openai-compa
5111
5113
  `${showToolDetails ? copy.generic.toolSummaryExpanded : copy.generic.toolSummaryCollapsed} (${copy.generic.toggleToolSummary}) · ${copy.generic.scrollHint}`
5112
5114
  )
5113
5115
  ),
5114
- h(ContextProgressMeter, { runtimeState, runtimeStatus, compact: true })
5116
+ h(ContextProgressMeter, { runtimeState, runtimeStatus, compact: true, copy })
5115
5117
  ),
5116
5118
  h(SuggestionPanel, { commandSuggestions, suggestionNav, menuIndex, copy }),
5117
5119
  h(PendingPanel, { pendingQueue, copy }),
@@ -67,7 +67,7 @@
67
67
  /* ── Layout ── */
68
68
  .layout {
69
69
  display: grid;
70
- grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
70
+ grid-template-columns: minmax(160px, 190px) minmax(0, 1fr);
71
71
  gap: 0;
72
72
  min-height: calc(100vh - 140px);
73
73
  }
@@ -1 +0,0 @@
1
- import{i as e}from"./index-B71xykPM.js";export{e as Mermaid};