mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-14 23:21:19 +00:00
Change to task mode
This commit is contained in:
parent
771332ca3e
commit
c7c6c8f0d6
4 changed files with 12 additions and 9 deletions
|
|
@ -2741,7 +2741,7 @@ export class Cline {
|
|||
if (!response) {
|
||||
this.consecutiveMistakeCount++
|
||||
pushToolResult(await this.sayAndCreateMissingParamError("respond_to_inquiry", "response"))
|
||||
await this.saveCheckpoint()
|
||||
// await this.saveCheckpoint()
|
||||
break
|
||||
}
|
||||
this.consecutiveMistakeCount = 0
|
||||
|
|
@ -2756,12 +2756,12 @@ export class Cline {
|
|||
const { text, images } = await this.ask("respond_to_inquiry", response, false)
|
||||
await this.say("user_feedback", text ?? "", images)
|
||||
pushToolResult(formatResponse.toolResult(`<user_message>\n${text}\n</user_message>`, images))
|
||||
await this.saveCheckpoint()
|
||||
// await this.saveCheckpoint()
|
||||
break
|
||||
}
|
||||
} catch (error) {
|
||||
await handleError("responding to inquiry", error)
|
||||
await this.saveCheckpoint()
|
||||
// await this.saveCheckpoint()
|
||||
break
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
export interface ChatSettings {
|
||||
mode: "code" | "chat"
|
||||
mode: "task" | "chat"
|
||||
}
|
||||
|
||||
export const DEFAULT_CHAT_SETTINGS: ChatSettings = {
|
||||
mode: "code",
|
||||
mode: "task",
|
||||
}
|
||||
|
|
|
|||
|
|
@ -482,7 +482,7 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
|
|||
|
||||
const onModeToggle = useCallback(() => {
|
||||
if (textAreaDisabled) return
|
||||
const newMode = chatSettings.mode === "chat" ? "code" : "chat"
|
||||
const newMode = chatSettings.mode === "chat" ? "task" : "chat"
|
||||
vscode.postMessage({
|
||||
type: "chatSettings",
|
||||
chatSettings: {
|
||||
|
|
@ -754,7 +754,7 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
|
|||
|
||||
<SwitchContainer disabled={textAreaDisabled} onClick={onModeToggle}>
|
||||
<Slider isChat={chatSettings.mode === "chat"} />
|
||||
<SwitchOption isActive={chatSettings.mode === "code"}>Code</SwitchOption>
|
||||
<SwitchOption isActive={chatSettings.mode === "task"}>Task</SwitchOption>
|
||||
<SwitchOption isActive={chatSettings.mode === "chat"}>Chat</SwitchOption>
|
||||
</SwitchContainer>
|
||||
</ControlsContainer>
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ const TaskHeader: React.FC<TaskHeaderProps> = ({
|
|||
totalCost,
|
||||
onClose,
|
||||
}) => {
|
||||
const { apiConfiguration, currentTaskItem, checkpointTrackerErrorMessage } = useExtensionState()
|
||||
const { apiConfiguration, currentTaskItem, checkpointTrackerErrorMessage, chatSettings } = useExtensionState()
|
||||
const [isTaskExpanded, setIsTaskExpanded] = useState(true)
|
||||
const [isTextExpanded, setIsTextExpanded] = useState(false)
|
||||
const [showSeeMore, setShowSeeMore] = useState(false)
|
||||
|
|
@ -155,7 +155,10 @@ const TaskHeader: React.FC<TaskHeaderProps> = ({
|
|||
flexGrow: 1,
|
||||
minWidth: 0, // This allows the div to shrink below its content size
|
||||
}}>
|
||||
<span style={{ fontWeight: "bold" }}>Task{!isTaskExpanded && ":"}</span>
|
||||
<span style={{ fontWeight: "bold" }}>
|
||||
{chatSettings.mode === "task" ? "Task" : "Chat"}
|
||||
{!isTaskExpanded && ":"}
|
||||
</span>
|
||||
{!isTaskExpanded && <span style={{ marginLeft: 4 }}>{highlightMentions(task.text, false)}</span>}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue