@miphamai/cli 0.7.2 β†’ 0.7.3

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/ui/app.tsx +25 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@miphamai/cli",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
4
4
  "description": "Mipham Code β€” Multi-model open-core intelligent coding terminal by MiphamAI",
5
5
  "keywords": [
6
6
  "ai",
package/src/ui/app.tsx CHANGED
@@ -220,12 +220,36 @@ export function App({
220
220
 
221
221
  try {
222
222
  for await (const chunk of engine.process(input, controller.signal)) {
223
+ // Show thinking indicator when model is reasoning (DeepSeek V4 thinking mode)
224
+ if (chunk.reasoning_content && turnContent === '') {
225
+ setMessages((prev) => {
226
+ const updated = [...prev]
227
+ const last = updated[updated.length - 1]
228
+ if (last?.role === 'assistant' && last.content === '') {
229
+ last.content = 'πŸ’­ 思考中…'
230
+ } else if (!last || last.role !== 'assistant' || last.content !== 'πŸ’­ 思考中…') {
231
+ updated.push({ role: 'assistant', content: 'πŸ’­ 思考中…' })
232
+ }
233
+ return updated
234
+ })
235
+ }
236
+
223
237
  if (chunk.type === 'text' && chunk.content) {
224
238
  // New turn: reset per-turn accumulator and push a fresh assistant message
225
239
  if (isNewTurn) {
226
240
  turnContent = chunk.content
227
241
  isNewTurn = false
228
- setMessages((prev) => [...prev, { role: 'assistant', content: turnContent }])
242
+ setMessages((prev) => {
243
+ const updated = [...prev]
244
+ const last = updated[updated.length - 1]
245
+ // Replace "thinking" placeholder with real content
246
+ if (last?.role === 'assistant' && last.content === 'πŸ’­ 思考中…') {
247
+ last.content = turnContent
248
+ } else {
249
+ updated.push({ role: 'assistant', content: turnContent })
250
+ }
251
+ return updated
252
+ })
229
253
  } else {
230
254
  turnContent += chunk.content
231
255
  setMessages((prev) => {