fix(pi): retain ownership for uncertain mutations

This commit is contained in:
2026-08-25 23:53:54 +08:00
parent 621ebb1781
commit 019cbb115a
21 changed files with 1113 additions and 67 deletions

View File

@@ -170,7 +170,7 @@ export function CodingConversationHeader({
value={modelValue}
aria-label="当前对话模型"
className="h-9 min-w-52 max-w-72 text-xs"
disabled={Boolean(busyAction)}
disabled={Boolean(busyAction) || running}
onChange={(event) => {
const selected = parseCodingModelKey(event.target.value);
if (!selected) return;
@@ -191,7 +191,7 @@ export function CodingConversationHeader({
value={thinkingLevel}
aria-label="当前对话思考级别"
className="h-9 w-36 shrink-0 text-xs"
disabled={Boolean(busyAction) || !model}
disabled={Boolean(busyAction) || !model || running}
onChange={(event) => perform('thinking', async () => {
await setCodingConversationThinking(
conversation.id,
@@ -215,7 +215,7 @@ export function CodingConversationHeader({
<RotateCcw className="mr-1.5 h-3.5 w-3.5" aria-hidden="true" />
</Button>
)}
<Button type="button" variant="ghost" className="min-h-9 shrink-0 rounded-xl px-3 text-xs" disabled={Boolean(busyAction)} onClick={() => perform('fork', onFork)}>
<Button type="button" variant="ghost" className="min-h-9 shrink-0 rounded-xl px-3 text-xs" disabled={Boolean(busyAction) || running} onClick={() => perform('fork', onFork)}>
<GitFork className="mr-1.5 h-3.5 w-3.5" aria-hidden="true" />
</Button>
<Button type="button" variant="ghost" className="min-h-9 shrink-0 rounded-xl px-3 text-xs" disabled={Boolean(busyAction)} onClick={() => perform('unread', onToggleUnread)}>