增加 opusplan 模式
Some checks are pending
Build Linux / Build Linux x86_64 (push) Waiting to run
Build Test / Build Test (${{ matrix.platform.name }}) (map[name:Linux os:ubuntu-latest rust-target:x86_64-unknown-linux-gnu]) (push) Waiting to run
Build Test / Build Test (${{ matrix.platform.name }}) (map[name:Windows os:windows-latest rust-target:x86_64-pc-windows-msvc]) (push) Waiting to run
Build Test / Build Test (${{ matrix.platform.name }}) (map[name:macOS os:macos-latest rust-target:x86_64-apple-darwin]) (push) Waiting to run
Build Test / Build Test Summary (push) Blocked by required conditions
Some checks are pending
Build Linux / Build Linux x86_64 (push) Waiting to run
Build Test / Build Test (${{ matrix.platform.name }}) (map[name:Linux os:ubuntu-latest rust-target:x86_64-unknown-linux-gnu]) (push) Waiting to run
Build Test / Build Test (${{ matrix.platform.name }}) (map[name:Windows os:windows-latest rust-target:x86_64-pc-windows-msvc]) (push) Waiting to run
Build Test / Build Test (${{ matrix.platform.name }}) (map[name:macOS os:macos-latest rust-target:x86_64-apple-darwin]) (push) Waiting to run
Build Test / Build Test Summary (push) Blocked by required conditions
This commit is contained in:
@@ -141,7 +141,7 @@ export const ClaudeCodeSession: React.FC<ClaudeCodeSessionProps> = ({
|
||||
const [forkSessionName, setForkSessionName] = useState("");
|
||||
|
||||
// Queued prompts state
|
||||
const [queuedPrompts, setQueuedPrompts] = useState<Array<{ id: string; prompt: string; model: "sonnet" | "opus" }>>([]);
|
||||
const [queuedPrompts, setQueuedPrompts] = useState<Array<{ id: string; prompt: string; model: "sonnet" | "opus" | "opus-plan" }>>([]);
|
||||
|
||||
// 使用布局管理器的预览功能
|
||||
// Note: openLayoutPreview is used directly instead of wrapping in handleOpenPreview
|
||||
@@ -175,7 +175,7 @@ export const ClaudeCodeSession: React.FC<ClaudeCodeSessionProps> = ({
|
||||
const unlistenRefs = useRef<UnlistenFn[]>([]);
|
||||
const hasActiveSessionRef = useRef(false);
|
||||
const floatingPromptRef = useRef<FloatingPromptInputRef>(null);
|
||||
const queuedPromptsRef = useRef<Array<{ id: string; prompt: string; model: "sonnet" | "opus" }>>([]);
|
||||
const queuedPromptsRef = useRef<Array<{ id: string; prompt: string; model: "sonnet" | "opus" | "opus-plan" }>>([]);
|
||||
const isMountedRef = useRef(true);
|
||||
const isListeningRef = useRef(false);
|
||||
const sessionStartTime = useRef<number>(Date.now());
|
||||
@@ -642,7 +642,7 @@ export const ClaudeCodeSession: React.FC<ClaudeCodeSessionProps> = ({
|
||||
}
|
||||
};
|
||||
|
||||
const handleSendPrompt = async (prompt: string, model: "sonnet" | "opus") => {
|
||||
const handleSendPrompt = async (prompt: string, model: "sonnet" | "opus" | "opus-plan") => {
|
||||
console.log('[ClaudeCodeSession] handleSendPrompt called with:', { prompt, model, projectPath, claudeSessionId, effectiveSession });
|
||||
|
||||
if (!projectPath) {
|
||||
|
@@ -26,7 +26,7 @@ interface FloatingPromptInputProps {
|
||||
/**
|
||||
* Callback when prompt is sent
|
||||
*/
|
||||
onSend: (prompt: string, model: "sonnet" | "opus") => void;
|
||||
onSend: (prompt: string, model: "sonnet" | "opus" | "opus-plan") => void;
|
||||
/**
|
||||
* Whether the input is loading
|
||||
*/
|
||||
@@ -38,7 +38,7 @@ interface FloatingPromptInputProps {
|
||||
/**
|
||||
* Default model to select
|
||||
*/
|
||||
defaultModel?: "sonnet" | "opus";
|
||||
defaultModel?: "sonnet" | "opus" | "opus-plan";
|
||||
/**
|
||||
* Project path for file picker
|
||||
*/
|
||||
@@ -95,7 +95,7 @@ const ThinkingModeIndicator: React.FC<{ level: number }> = ({ level }) => {
|
||||
};
|
||||
|
||||
type Model = {
|
||||
id: "sonnet" | "opus";
|
||||
id: "sonnet" | "opus" | "opus-plan";
|
||||
name: string;
|
||||
description: string;
|
||||
icon: React.ReactNode;
|
||||
@@ -139,6 +139,12 @@ const FloatingPromptInputInner = (
|
||||
name: t('agents.opusName'),
|
||||
description: t('agents.opusDescription'),
|
||||
icon: <Sparkles className="h-4 w-4" />
|
||||
},
|
||||
{
|
||||
id: "opus-plan",
|
||||
name: t('agents.opusPlanName'),
|
||||
description: t('agents.opusPlanDescription'),
|
||||
icon: <Brain className="h-4 w-4" />
|
||||
}
|
||||
];
|
||||
|
||||
@@ -180,7 +186,7 @@ const FloatingPromptInputInner = (
|
||||
}
|
||||
];
|
||||
const [prompt, setPrompt] = useState("");
|
||||
const [selectedModel, setSelectedModel] = useState<"sonnet" | "opus">(defaultModel);
|
||||
const [selectedModel, setSelectedModel] = useState<"sonnet" | "opus" | "opus-plan">(defaultModel);
|
||||
const [selectedThinkingMode, setSelectedThinkingMode] = useState<ThinkingMode>("auto");
|
||||
const [isExpanded, setIsExpanded] = useState(false);
|
||||
const [modelPickerOpen, setModelPickerOpen] = useState(false);
|
||||
|
Reference in New Issue
Block a user