@miphamai/cli 0.7.1 β 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/core/permission.ts +3 -2
- package/src/ui/app.tsx +25 -1
package/package.json
CHANGED
package/src/core/permission.ts
CHANGED
|
@@ -170,8 +170,9 @@ export class PermissionSystem {
|
|
|
170
170
|
: 'ask'
|
|
171
171
|
|
|
172
172
|
case 'auto':
|
|
173
|
-
//
|
|
174
|
-
|
|
173
|
+
// Safety checks handled by hook layer (PreToolUse hooks).
|
|
174
|
+
// Bypass the static permission system so hooks are the sole gate.
|
|
175
|
+
return 'bypass'
|
|
175
176
|
|
|
176
177
|
case 'dontAsk':
|
|
177
178
|
// Only allowlisted tools free (already handled above); everything else requires approval
|
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) => {
|