Final touches to advisor

This commit is contained in:
Saoud Rizwan 2025-01-18 18:59:39 -08:00
parent 21ae763f13
commit d6e308d679
11 changed files with 164 additions and 102 deletions

View file

@ -1194,11 +1194,15 @@ export class Cline {
throw new Error("MCP hub not available")
}
const advisorModel = this.api.getAdvisorModel?.()
const supportsConsultAdvisor = advisorModel !== undefined
let systemPrompt = await SYSTEM_PROMPT(
cwd,
this.api.getModel().info.supportsComputerUse ?? false,
mcpHub,
this.browserSettings,
supportsConsultAdvisor,
)
let settingsCustomInstructions = this.customInstructions?.trim()
const clineRulesFilePath = path.resolve(cwd, GlobalFileNames.clineRules)
@ -1267,7 +1271,6 @@ export class Cline {
let stream = this.api.createMessage(systemPrompt, truncatedConversationHistory)
// If we're consulting the advisor, override the request
const advisorModel = this.api.getAdvisorModel?.()
if (this.advisorProblem && advisorModel) {
// Generate markdown
const markdownContent = truncatedConversationHistory
@ -1288,7 +1291,15 @@ export class Cline {
const charsToKeep = tokensToKeep * 3
// Get last n chars of markdown content
const isTruncated = markdownContent.length > charsToKeep
const recentContext = (isTruncated ? "... (truncated for brevity)\n\n" : "") + markdownContent.slice(-charsToKeep)
const firstMessage = truncatedConversationHistory.at(0)
const firstMessageContent = firstMessage
? Array.isArray(firstMessage.content)
? firstMessage.content.map((block) => (block.type === "text" ? block.text : "")).join("\n")
: firstMessage.content
: ""
const recentContext =
(isTruncated ? `**User:**:\n\n${firstMessageContent}\n\n... (older messages removed for brevity) ...\n\n` : "") +
markdownContent.slice(-charsToKeep)
const advisorMessage: Anthropic.Messages.MessageParam[] = [
{
role: "user",
@ -1296,9 +1307,9 @@ export class Cline {
{
type: "text",
text:
"\n\nThe conversation history leading up to this point: " +
"\n\n# The conversation history leading up to this point:\n\n" +
recentContext +
"\n\nThe problem the coding agent needs advice on: " +
"\n\n# The problem the coding agent needs advice on:\n\n" +
this.advisorProblem,
},
],
@ -2547,6 +2558,7 @@ export class Cline {
if (block.partial) {
const partialMessage = JSON.stringify({
problem: removeClosingTag("problem", problem),
advisorModelId: this.api.getAdvisorModel?.().id,
} satisfies ClineConsultAdvisor)
if (this.shouldAutoApproveTool(block.name)) {
@ -2569,6 +2581,7 @@ export class Cline {
this.consecutiveMistakeCount = 0
const completeMessage = JSON.stringify({
problem: removeClosingTag("problem", problem),
advisorModelId: this.api.getAdvisorModel?.().id,
} satisfies ClineConsultAdvisor)
if (this.shouldAutoApproveTool(block.name)) {
@ -2587,6 +2600,18 @@ export class Cline {
}
}
// Update the last consult_advisor message in case the advisor model changed
const lastMessage = findLast(
this.clineMessages,
(m) => m.ask === "consult_advisor" || m.say === "consult_advisor",
)
if (lastMessage) {
lastMessage.text = JSON.stringify({
problem: removeClosingTag("problem", problem),
advisorModelId: this.api.getAdvisorModel?.().id,
} satisfies ClineConsultAdvisor)
}
// now execute the tool
this.advisorProblem = problem
// await this.say("consult_advisor_request_started")

View file

@ -11,42 +11,12 @@ You will receive:
====
RESPONSE FORMAT
HOW TO RESPOND
Your responses should generally follow this structure:
After being given the necessary context, you may start by assessing the problem and key challenges, focusing on the most critical aspects that need to be addressed.
1. Problem Analysis
A summary of the context and key challenges, focusing on the most critical aspects that need to be addressed.
2. Solution Approach
The recommended strategy or solution, broken down into clear, actionable steps. Include rationale for key decisions and potential trade-offs considered. Use specific technical guidance, including code snippets, architecture recommendations, or debugging strategies as needed. Focus on practical, implementable advice the agent can use to apply the solution.
You may then recommend a strategy or solution, broken down into clear, actionable steps. Include rationale for key decisions and potential trade-offs considered. Use specific technical guidance, including code snippets, architecture recommendations, or debugging strategies as needed. Focus on practical, implementable advice the agent can use to apply the solution.
====
ADVISORY PRINCIPLES
1. Focus on providing actionable, concrete guidance rather than theoretical discussions. Your advice should enable immediate progress.
2. Consider both immediate solutions and long-term implications. Guide the agent toward maintainable, scalable solutions while solving the current problem.
3. Adapt your guidance based on the context. Account for:
- Existing codebase and architecture
- Applied technologies and constraints
- Performance and scalability requirements
- Project conventions and standards
4. When analyzing problems:
- Start with a systematic evaluation of the issue
- Consider common pitfalls and edge cases
- Look for patterns in error messages or behavior
- Think about interaction between system components
5. For architectural guidance:
- Recommend established patterns when appropriate
- Consider system boundaries and integration points
- Address scalability and maintenance concerns
- Focus on practical, implementable solutions
====
Remember: Your goal is to provide clear, actionable guidance that helps the agent make immediate progress while following good software development practices. Focus on practical solutions rather than theoretical discussions.`
Remember: Your goal is to provide clear, actionable guidance that helps the agent make progress. Focus on practical solutions rather than theoretical discussions.`

View file

@ -9,6 +9,7 @@ export const SYSTEM_PROMPT = async (
supportsComputerUse: boolean,
mcpHub: McpHub,
browserSettings: BrowserSettings,
supportsConsultAdvisor: boolean,
) => `You are Cline, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.
====
@ -204,16 +205,20 @@ Usage:
<access_mcp_resource>
<server_name>server name here</server_name>
<uri>resource URI here</uri>
</access_mcp_resource>
</access_mcp_resource>${
supportsConsultAdvisor
? `
## consult_advisor
Description: Request to consult a higher-reasoning advisor model about a problem or question you are facing. This can be used to outline a plan, discuss potential solutions, or resolve errors you are stuck on. The relevant conversation history leading to the problem will also be provided to the advisor for additional context.
Description: Request to consult an advanced-reasoning AI model about a problem or question you are facing. This can be used to resolve errors you are stuck on, or get input from the model to work through a challenge you are facing. The relevant conversation history leading to the problem will also be provided to the advisor for additional context.
Parameters:
- problem: (required) A string describing the issue, question, or context you want the advisor to address.
Usage:
<consult_advisor>
<problem>Your problem or question here</problem>
</consult_advisor>
</consult_advisor>`
: ""
}
## ask_followup_question
Description: Ask the user a question to gather additional information needed to complete the task. This tool should be used when you encounter ambiguities, need clarification, or require more details to proceed effectively. It allows for interactive problem-solving by enabling direct communication with the user. Use this tool judiciously to maintain a balance between gathering necessary information and avoiding excessive back-and-forth.
@ -823,25 +828,18 @@ You have access to two tools for working with files: **write_to_file** and **rep
3. For major overhauls or initial file creation, rely on write_to_file.
4. Once the file has been edited with either write_to_file or replace_in_file, the system will provide you with the final state of the modified file. Use this updated content as the reference point for any subsequent SEARCH/REPLACE operations, since it reflects any auto-formatting or user-applied changes.
By thoughtfully selecting between write_to_file and replace_in_file, you can make your file editing process smoother, safer, and more efficient.
By thoughtfully selecting between write_to_file and replace_in_file, you can make your file editing process smoother, safer, and more efficient.${
supportsConsultAdvisor
? `
====
CONSULTING THE ADVISOR MODEL
You can use the consult_advisor tool to get higher-level reasoning or suggestions from an advisor model. The advisor is a more powerful AI model that can provide strategic guidance and help solve complex problems. The conversation history that led to the current situation is automatically passed to the advisor, allowing it to provide contextually relevant guidance based on the full picture of the task at hand.
You can use the consult_advisor tool to get suggestions from an advisor model, a powerful AI model that can provide strategic guidance and help solve complex problems. The conversation history that led to the current situation is automatically passed to the advisor, allowing it to provide contextually relevant guidance based on the full picture of the task at hand.
# When to Use the Advisor
1. Architecting Complex Tasks
- Before starting implementation of large features or systems
- When planning new applications or major refactors
- To break down complex requirements into actionable steps
- To identify potential technical challenges early
- To evaluate different technical approaches and their tradeoffs
- When the solution requires careful consideration of multiple system components
2. Resolving Challenging Bugs
- When stuck on persistent bugs that you cannot resolve
- If you've tried multiple approaches without success
- When facing complex type errors or package incompatibilities
@ -850,13 +848,13 @@ You can use the consult_advisor tool to get higher-level reasoning or suggestion
# How to Use Effectively
1. Provide Clear Context
## Provide Clear Context
- Explain the current situation and challenge
- Include relevant code snippets or error messages
- Describe what you've already tried
- Specify what kind of guidance you're seeking
2. Ask Specific Questions
## Ask Specific Questions
- Instead of "Why isn't this working?"
- Better: "I'm encountering this specific type error when integrating these packages, here's what I've tried..."
@ -885,22 +883,14 @@ The error persists despite these attempts. Could this be due to version mismatch
# Benefits of Using the Advisor
1. Strategic Guidance
- Get high-level architectural direction
- Identify potential pitfalls early
- Make informed technical decisions
- Consider long-term implications
2. Problem Resolution
- Break through debugging roadblocks
- Get fresh perspectives on complex issues
- Understand root causes of persistent bugs
- Solve challenging technical issues
Remember: While you should attempt to solve problems with your own reasoning first, the advisor is a powerful resource available when you're either planning complex systems or truly stuck on a bug. Don't hesitate to consult it when:
- The scope of the task requires careful architectural planning
- You've hit a persistent roadblock that you cannot resolve
- You need deeper insight into complex system interactions
Remember: While you should attempt to solve problems with your own reasoning first, the advisor is a powerful resource available when you're stuck on a bug. Don't hesitate to consult it when you've hit a persistent roadblock that you cannot resolve.`
: ""
}
====
@ -908,7 +898,9 @@ CAPABILITIES
- You have access to tools that let you execute CLI commands on the user's computer, list files, view source code definitions, regex search${
supportsComputerUse ? ", use the browser" : ""
}, read and edit files, and ask follow-up questions. These tools help you effectively accomplish a wide range of tasks, such as writing code, making edits or improvements to existing files, understanding the current state of a project, performing system operations, and much more.
}, read and edit files${
supportsConsultAdvisor ? ", consult an advisor" : ""
}, and ask follow-up questions. These tools help you effectively accomplish a wide range of tasks, such as writing code, making edits or improvements to existing files, understanding the current state of a project, performing system operations, and much more.
- When the user initially gives you a task, a recursive list of all filepaths in the current working directory ('${cwd.toPosix()}') will be included in environment_details. This provides an overview of the project's file structure, offering key insights into the project from directory/file names (how developers conceptualize and organize their code) and file extensions (the language used). This can also guide decision-making on which files to explore further. If you need to further explore directories such as outside the current working directory, you can use the list_files tool. If you pass 'true' for the recursive parameter, it will list files recursively. Otherwise, it will list files at the top level, which is better suited for generic directories where you don't necessarily need the nested structure, like the Desktop.
- You can use search_files to perform regex searches across files in a specified directory, outputting context-rich results that include surrounding lines. This is particularly useful for understanding code patterns, finding specific implementations, or identifying areas that need refactoring.
- You can use the list_code_definition_names tool to get an overview of source code definitions for all files at the top level of a specified directory. This can be particularly useful when you need to understand the broader context and relationships between certain parts of the code. You may need to call this tool multiple times to understand various parts of the codebase related to the task.
@ -918,7 +910,11 @@ CAPABILITIES
? "\n- You can use the browser_action tool to interact with websites (including html files and locally running development servers) through a Puppeteer-controlled browser when you feel it is necessary in accomplishing the user's task. This tool is particularly useful for web development tasks as it allows you to launch a browser, navigate to pages, interact with elements through clicks and keyboard input, and capture the results through screenshots and console logs. This tool may be useful at key stages of web development tasks-such as after implementing new features, making substantial changes, when troubleshooting issues, or to verify the result of your work. You can analyze the provided screenshots to ensure correct rendering or identify errors, and review console logs for runtime issues.\n - For example, if asked to add a component to a react website, you might create the necessary files, use execute_command to run the site locally, then use browser_action to launch the browser, navigate to the local server, and verify the component renders & functions correctly before closing the browser."
: ""
}
- You have access to MCP servers that may provide additional tools and resources. Each server may provide different capabilities that you can use to accomplish tasks more effectively.
- You have access to MCP servers that may provide additional tools and resources. Each server may provide different capabilities that you can use to accomplish tasks more effectively.${
supportsConsultAdvisor
? "\n- When you hit a roadblock, such as an error you've attempted to resolve several times without success, you can use the consult_advisor tool to get suggestions from an advanced-reasoning AI model. The conversation history that led to the current situation is automatically passed to the advisor, allowing it to provide contextually relevant guidance based on the full picture of the task at hand."
: ""
}
====

View file

@ -565,6 +565,11 @@ export class ClineProvider implements vscode.WebviewViewProvider {
case "cancelTask":
this.cancelTask()
break
case "openAdvisorModelSettings":
this.postMessageToWebview({
type: "openAdvisorModelSettings",
})
break
case "openMcpSettings": {
const mcpSettingsFilePath = await this.mcpHub?.getMcpSettingsFilePath()
if (mcpSettingsFilePath) {

View file

@ -21,6 +21,7 @@ export interface ExtensionMessage {
| "openRouterModels"
| "mcpServers"
| "relinquishControl"
| "openAdvisorModelSettings"
text?: string
action?: "chatButtonClicked" | "mcpButtonClicked" | "settingsButtonClicked" | "historyButtonClicked" | "didBecomeVisible"
invoke?: "sendMessage" | "primaryButtonClick" | "secondaryButtonClick"
@ -144,6 +145,7 @@ export interface ClineAskUseMcpServer {
export interface ClineConsultAdvisor {
problem: string
advisorModelId?: string
}
export interface ClineApiReqInfo {

View file

@ -31,6 +31,7 @@ export interface WebviewMessage {
| "checkpointDiff"
| "checkpointRestore"
| "taskCompletionViewChanges"
| "openAdvisorModelSettings"
// | "relaunchChromeDebugMode"
text?: string
askResponse?: ClineAskResponse

View file

@ -15,6 +15,7 @@ const AppContent = () => {
const [showHistory, setShowHistory] = useState(false)
const [showMcp, setShowMcp] = useState(false)
const [showAnnouncement, setShowAnnouncement] = useState(false)
const [showAdvisorModelSettings, setShowAdvisorModelSettings] = useState(false)
const handleMessage = useCallback((e: MessageEvent) => {
const message: ExtensionMessage = e.data
@ -23,26 +24,36 @@ const AppContent = () => {
switch (message.action!) {
case "settingsButtonClicked":
setShowSettings(true)
setShowAdvisorModelSettings(false)
setShowHistory(false)
setShowMcp(false)
break
case "historyButtonClicked":
setShowSettings(false)
setShowAdvisorModelSettings(false)
setShowHistory(true)
setShowMcp(false)
break
case "mcpButtonClicked":
setShowSettings(false)
setShowAdvisorModelSettings(false)
setShowHistory(false)
setShowMcp(true)
break
case "chatButtonClicked":
setShowSettings(false)
setShowAdvisorModelSettings(false)
setShowHistory(false)
setShowMcp(false)
break
}
break
case "openAdvisorModelSettings":
setShowSettings(true)
setShowAdvisorModelSettings(true)
setShowHistory(false)
setShowMcp(false)
break
}
}, [])
@ -65,7 +76,9 @@ const AppContent = () => {
<WelcomeView />
) : (
<>
{showSettings && <SettingsView onDone={() => setShowSettings(false)} />}
{showSettings && (
<SettingsView onDone={() => setShowSettings(false)} showAdvisorModelSettings={showAdvisorModelSettings} />
)}
{showHistory && <HistoryView onDone={() => setShowHistory(false)} />}
{showMcp && <McpView onDone={() => setShowMcp(false)} />}
{/* Do not conditionally load ChatView, it's expensive and there's state we don't want to lose (user input, disableInput, askResponse promise, etc.) */}

View file

@ -1,4 +1,4 @@
import { VSCodeBadge, VSCodeProgressRing } from "@vscode/webview-ui-toolkit/react"
import { VSCodeBadge, VSCodeLink, VSCodeProgressRing } from "@vscode/webview-ui-toolkit/react"
import deepEqual from "fast-deep-equal"
import React, { memo, useCallback, useEffect, useMemo, useRef, useState } from "react"
import { useEvent, useSize } from "react-use"
@ -25,6 +25,7 @@ import Thumbnails from "../common/Thumbnails"
import McpResourceRow from "../mcp/McpResourceRow"
import McpToolRow from "../mcp/McpToolRow"
import { highlightMentions } from "./TaskHeader"
import { normalizeApiConfiguration } from "../settings/ApiOptions"
const ChatRowContainer = styled.div`
padding: 10px 6px 10px 15px;
@ -102,7 +103,7 @@ const ChatRow = memo(
export default ChatRow
export const ChatRowContent = ({ message, isExpanded, onToggleExpand, lastModifiedMessage, isLast }: ChatRowContentProps) => {
const { mcpServers } = useExtensionState()
const { mcpServers, apiConfiguration } = useExtensionState()
const [seeNewChangesDisabled, setSeeNewChangesDisabled] = useState(false)
@ -144,6 +145,10 @@ export const ChatRowContent = ({ message, isExpanded, onToggleExpand, lastModifi
useEvent("message", handleMessage)
const { selectedAdvisorModelId } = useMemo(() => {
return normalizeApiConfiguration(apiConfiguration)
}, [apiConfiguration])
const [icon, title] = useMemo(() => {
switch (type) {
case "error":
@ -221,19 +226,19 @@ export const ChatRowContent = ({ message, isExpanded, onToggleExpand, lastModifi
]
case "consult_advisor":
// const consultAdvisor = JSON.parse(message.text || "{}") as ClineConsultAdvisor
const consultAdvisor = JSON.parse(message.text || "{}") as ClineConsultAdvisor
return [
<span
className="codicon codicon-server"
className="codicon codicon-comment-discussion"
style={{
color: normalColor,
marginBottom: "-1.5px",
}}></span>,
<span style={{ color: normalColor, fontWeight: "bold" }}>
{message.type === "ask" ? (
<>Cline wants to consult the Advisor model about:</>
) : (
<>Cline consulted the Advisor model about:</>
)}
<>
Cline wants to consult{" "}
{<code>{isLast ? selectedAdvisorModelId : consultAdvisor.advisorModelId}</code> || "Advisor model"}:
</>
</span>,
]
case "completion_result":
@ -327,6 +332,8 @@ export const ChatRowContent = ({ message, isExpanded, onToggleExpand, lastModifi
isMcpServerResponding,
message.text,
message.type,
selectedAdvisorModelId,
isLast,
])
const headerStyle: React.CSSProperties = {
@ -757,6 +764,20 @@ export const ChatRowContent = ({ message, isExpanded, onToggleExpand, lastModifi
}}>
{consultAdvisor.problem}
</div>
<div
style={{
padding: 8,
fontSize: "12px",
color: "var(--vscode-descriptionForeground)",
}}>
You can change the Advisor model Cline consults with{" "}
<VSCodeLink
style={{ display: "inline", fontSize: "inherit" }}
onClick={() => vscode.postMessage({ type: "openAdvisorModelSettings" })}>
in Settings.
</VSCodeLink>
</div>
</>
)
}
@ -881,22 +902,28 @@ export const ChatRowContent = ({ message, isExpanded, onToggleExpand, lastModifi
)
case "advisor_response":
return (
<div style={{ paddingTop: 0 }}>
<div
style={{
border: "1px solid color-mix(in srgb, var(--vscode-descriptionForeground) 25%, transparent)",
borderRadius: "4px",
padding: "16px",
position: "relative",
marginTop: "10px",
}}>
<div
style={{
marginBottom: "4px",
opacity: 0.8,
position: "absolute",
top: "-8px",
left: "16px",
backgroundColor: "var(--vscode-sideBar-background)",
padding: "0 8px",
color: "var(--vscode-descriptionForeground)",
fontSize: "12px",
textTransform: "uppercase",
}}>
Response
Advisor Response
</div>
<CodeAccordian
code={message.text}
language="json"
isExpanded={true}
onToggleExpand={onToggleExpand}
/>
<Markdown markdown={message.text} />
</div>
)
case "user_feedback":

View file

@ -48,6 +48,7 @@ interface ApiOptionsProps {
apiErrorMessage?: string
modelIdErrorMessage?: string
advisorModelIdErrorMessage?: string
showAdvisorModelSettings?: boolean
}
const TabPanel = ({ children, isSelected }: { children: React.ReactNode; isSelected: boolean }) => {
@ -86,14 +87,20 @@ const TabButton = ({
)
}
const ApiOptions = ({ showModelOptions, apiErrorMessage, modelIdErrorMessage, advisorModelIdErrorMessage }: ApiOptionsProps) => {
const ApiOptions = ({
showModelOptions,
apiErrorMessage,
modelIdErrorMessage,
advisorModelIdErrorMessage,
showAdvisorModelSettings,
}: ApiOptionsProps) => {
const { apiConfiguration, setApiConfiguration, uriScheme } = useExtensionState()
const [ollamaModels, setOllamaModels] = useState<string[]>([])
const [lmStudioModels, setLmStudioModels] = useState<string[]>([])
const [anthropicBaseUrlSelected, setAnthropicBaseUrlSelected] = useState(!!apiConfiguration?.anthropicBaseUrl)
const [azureApiVersionSelected, setAzureApiVersionSelected] = useState(!!apiConfiguration?.azureApiVersion)
const [isDescriptionExpanded, setIsDescriptionExpanded] = useState(false)
const [selectedTab, setSelectedTab] = useState("base")
const [selectedTab, setSelectedTab] = useState(showAdvisorModelSettings ? "advisor" : "base")
const handleInputChange = (field: keyof ApiConfiguration) => (event: any) => {
setApiConfiguration({
@ -846,8 +853,8 @@ const ApiOptions = ({ showModelOptions, apiErrorMessage, modelIdErrorMessage, ad
marginBottom: "10px",
color: "var(--vscode-foreground)",
}}>
The Cline model can consult this smarter, more powerful model for help on planning out a task, fixing
a hard bug, and other complex problems.
The Cline model can consult this more powerful model for advice when running into roadblocks, such as
an error it cannot resolve.
</p>
{selectedProvider === "anthropic" && (
<div className="dropdown-container" style={{ marginBottom: 15 }}>

View file

@ -238,17 +238,31 @@ const OpenRouterModelPicker: React.FC<OpenRouterModelPickerProps> = ({ modelType
marginTop: 0,
color: "var(--vscode-descriptionForeground)",
}}>
The extension automatically fetches the latest list of models available on{" "}
<VSCodeLink style={{ display: "inline", fontSize: "inherit" }} href="https://openrouter.ai/models">
OpenRouter.
</VSCodeLink>
If you're unsure which model to choose, Cline works best with{" "}
<VSCodeLink
style={{ display: "inline", fontSize: "inherit" }}
onClick={() => handleModelChange("anthropic/claude-3.5-sonnet:beta")}>
anthropic/claude-3.5-sonnet:beta.
</VSCodeLink>
You can also try searching "free" for no-cost options currently available.
{modelType === "base" ? (
<>
The extension automatically fetches the latest list of models available on{" "}
<VSCodeLink style={{ display: "inline", fontSize: "inherit" }} href="https://openrouter.ai/models">
OpenRouter.
</VSCodeLink>
If you're unsure which model to choose, Cline works best with{" "}
<VSCodeLink
style={{ display: "inline", fontSize: "inherit" }}
onClick={() => handleModelChange("anthropic/claude-3.5-sonnet:beta")}>
anthropic/claude-3.5-sonnet:beta.
</VSCodeLink>
You can also try searching "free" for no-cost options currently available.
</>
) : (
<>
It's recommended using a higher-reasoning model such as{" "}
<VSCodeLink
style={{ display: "inline", fontSize: "inherit" }}
onClick={() => handleModelChange("openai/o1-preview")}>
openai/o1-preview
</VSCodeLink>
for the best results.
</>
)}
</p>
)}
</div>

View file

@ -8,10 +8,11 @@ import ApiOptions from "./ApiOptions"
const IS_DEV = false // FIXME: use flags when packaging
type SettingsViewProps = {
showAdvisorModelSettings: boolean
onDone: () => void
}
const SettingsView = ({ onDone }: SettingsViewProps) => {
const SettingsView = ({ showAdvisorModelSettings, onDone }: SettingsViewProps) => {
const { apiConfiguration, version, customInstructions, setCustomInstructions, openRouterModels } = useExtensionState()
const [apiErrorMessage, setApiErrorMessage] = useState<string | undefined>(undefined)
const [modelIdErrorMessage, setModelIdErrorMessage] = useState<string | undefined>(undefined)
@ -93,6 +94,7 @@ const SettingsView = ({ onDone }: SettingsViewProps) => {
<div style={{ marginBottom: 5 }}>
<ApiOptions
showModelOptions={true}
showAdvisorModelSettings={showAdvisorModelSettings}
apiErrorMessage={apiErrorMessage}
modelIdErrorMessage={modelIdErrorMessage}
advisorModelIdErrorMessage={advisorModelIdErrorMessage}