@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.
- package/package.json +1 -1
- package/src/ui/app.tsx +25 -1
package/package.json
CHANGED
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) =>
|
|
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) => {
|