@miphamai/cli 0.85.46 → 0.85.47

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.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Mipham Code v0.85.46
1
+ # Mipham Code v0.85.47
2
2
 
3
3
  **Multi-model open-core intelligent coding terminal** — 12 AI providers, 141 commands, 31 tools, 28 skills + marketplace, self-update. AI-assisted code generation, security auditing, MCP protocol, and extensible skills — in a single CLI.
4
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@miphamai/cli",
3
- "version": "0.85.46",
3
+ "version": "0.85.47",
4
4
  "description": "Mipham Code — Multi-model open-core intelligent coding terminal by MiphamAI",
5
5
  "keywords": [
6
6
  "ai",
@@ -9,7 +9,7 @@
9
9
  export const PACKAGE_NAME = '@miphamai/cli' as const
10
10
 
11
11
  /** 当前发布版本 */
12
- export const PACKAGE_VERSION = '0.85.46' as const
12
+ export const PACKAGE_VERSION = '0.85.47' as const
13
13
 
14
14
  /** npm install 全局安装命令 */
15
15
  export const NPM_INSTALL_COMMAND = `npm install -g ${PACKAGE_NAME}` as const
@@ -90,4 +90,4 @@ export const TOOL_COUNT = 31 as const
90
90
  * —— `test/e2e/full-pipeline.test.ts` 在 Linux 上整文件 skip、在 macOS 上跑 ——
91
91
  * 但**总数相同**(两边都把被 skip 的算进去)。
92
92
  */
93
- export const TEST_COUNT = 5228 as const
93
+ export const TEST_COUNT = 5232 as const
package/src/ui/app.tsx CHANGED
@@ -1442,7 +1442,7 @@ export function App({
1442
1442
  return (
1443
1443
  <Box flexDirection="column" padding={1} height="100%">
1444
1444
  {/* Chat panel — show existing messages */}
1445
- <ChatPanel messages={messages} focusMode={false} />
1445
+ <ChatPanel messages={messages} focusMode={false} version={version} />
1446
1446
 
1447
1447
  {/* API Key input prompt */}
1448
1448
  <Box flexDirection="column" marginTop={1}>
@@ -1529,7 +1529,13 @@ export function App({
1529
1529
  ) : (
1530
1530
  <>
1531
1531
  {/* Chat panel */}
1532
- <ChatPanel messages={messages} focusMode={focusMode} turnActive={isLoading} />
1532
+ <ChatPanel
1533
+ messages={messages}
1534
+ focusMode={focusMode}
1535
+ turnActive={isLoading}
1536
+ version={version}
1537
+ updateStatus={updateStatus}
1538
+ />
1533
1539
  {(() => {
1534
1540
  const indicator = formatThinking(
1535
1541
  config.showThinking ?? 'off',
@@ -1670,8 +1676,9 @@ export function App({
1670
1676
  {/* graft status line — mirrors graft's own "◤ graft · …" bar */}
1671
1677
  <GraftStatusLine cwd={process.cwd()} ctxPct={contextUsagePct(engine)} />
1672
1678
 
1673
- {/* Update notification — green, right-aligned, mirrors Claude Code's "Update installed · Restart to apply" */}
1674
- {updateStatus && (
1679
+ {/* Update notification — green, right-aligned, mirrors Claude Code's "Update installed · Restart to apply".
1680
+ While the startup banner is showing it already carries this line, so the footer copy is suppressed to avoid a duplicate. */}
1681
+ {updateStatus && messages.length > 0 && (
1675
1682
  <Box marginTop={1} flexDirection="row" justifyContent="flex-end" width="100%">
1676
1683
  <Text color="green">
1677
1684
  {updateStatus.state === 'installed'
package/src/ui/chat.tsx CHANGED
@@ -9,12 +9,17 @@ import {
9
9
  stripControlCharsForDisplay,
10
10
  } from '../shared/sanitize'
11
11
  import { homedir } from 'node:os'
12
+ import type { UpdateStatus } from '../shared/update'
12
13
 
13
14
  interface ChatPanelProps {
14
15
  messages: ChatMessage[]
15
16
  focusMode?: boolean
16
17
  /** A turn is in flight — the moment the focus tip is worth offering. */
17
18
  turnActive?: boolean
19
+ /** Current CLI version, shown in the startup banner title ("Mipham Code v0.85.46"). */
20
+ version?: string
21
+ /** Startup update check result, surfaced in the banner so the opening window shows the pending version too. */
22
+ updateStatus?: UpdateStatus | null
18
23
  }
19
24
 
20
25
  /**
@@ -184,7 +189,13 @@ const MessageRow = React.memo(
184
189
  prev.msg.toolMeta?.collapsed === next.msg.toolMeta?.collapsed,
185
190
  )
186
191
 
187
- export function ChatPanel({ messages, focusMode, turnActive }: ChatPanelProps) {
192
+ export function ChatPanel({
193
+ messages,
194
+ focusMode,
195
+ turnActive,
196
+ version,
197
+ updateStatus,
198
+ }: ChatPanelProps) {
188
199
  const { t } = useI18n()
189
200
  // Memoize display message computation to avoid O(n) compact on every render.
190
201
  // During streaming, messages changes on every chunk; without memoization,
@@ -222,10 +233,20 @@ export function ChatPanel({ messages, focusMode, turnActive }: ChatPanelProps) {
222
233
  <Box marginBottom={1}>
223
234
  <Text color="cyan" bold>
224
235
  {t('ui.banner.title')}
236
+ {version ? ` v${version}` : ''}
225
237
  </Text>
226
238
  <Text dimColor> — {t('ui.banner.subtitle')}</Text>
227
239
  </Box>
228
240
  <Text dimColor>{t('ui.banner.tagline')}</Text>
241
+ {updateStatus && (
242
+ <Box marginTop={1}>
243
+ <Text color="green">
244
+ {updateStatus.state === 'installed'
245
+ ? `✔ ${t('ui.status.update_installed_restart')}`
246
+ : `✔ ${t('ui.status.update_available', { version: updateStatus.latest })}`}
247
+ </Text>
248
+ </Box>
249
+ )}
229
250
  <Box marginTop={1}>
230
251
  <Text dimColor>{t('ui.banner.start_message')}</Text>
231
252
  </Box>