fix(pi): converge worker failures and thinking state
This commit is contained in:
@@ -98,6 +98,10 @@ export function CodingConversationHeader({
|
||||
const modelValue = model ? codingModelKey(model) : '';
|
||||
const hasCurrentOption = options.some((option) => option.key === modelValue);
|
||||
const thinkingLevel = model?.thinkingLevel ?? 'off';
|
||||
const availableThinkingLevels = snapshot?.conversation.model.availableThinkingLevels;
|
||||
const thinkingOptions = availableThinkingLevels
|
||||
? THINKING_OPTIONS.filter((option) => availableThinkingLevels.includes(option.value))
|
||||
: THINKING_OPTIONS;
|
||||
const runStatus = snapshot?.run.status ?? 'preparing';
|
||||
const running = ['queued', 'running', 'retrying', 'compacting', 'aborting'].includes(runStatus);
|
||||
const queueCount = snapshot?.queue.items.length ?? 0;
|
||||
@@ -196,7 +200,7 @@ export function CodingConversationHeader({
|
||||
await onRefresh();
|
||||
})}
|
||||
>
|
||||
{THINKING_OPTIONS.map((option) => <option key={option.value} value={option.value}>{option.label}</option>)}
|
||||
{thinkingOptions.map((option) => <option key={option.value} value={option.value}>{option.label}</option>)}
|
||||
</Select>
|
||||
<div className="flex min-w-44 items-center gap-2 rounded-xl bg-surface-subtle px-3 py-2 text-[11px] text-muted-foreground" title="当前 Conversation 的上下文使用量">
|
||||
<span className="whitespace-nowrap">上下文 {context?.usedTokens ?? 0}/{context?.contextWindow ?? 0}</span>
|
||||
|
||||
Reference in New Issue
Block a user