@@ -14,8 +14,7 @@ import {
1414} from "@/components/ui/hover-card" ;
1515import { ApprovalButton , type useApprovalAndRetry } from "@/features/approval" ;
1616import { useAutoApproveGuard , useTaskChangedFiles } from "@/features/chat" ;
17- import { useSelectedModels } from "@/features/settings" ;
18- import { AutoApproveMenu } from "@/features/settings" ;
17+ import { AutoApproveMenu , useSelectedModels } from "@/features/settings" ;
1918import { TodoList , useTodos } from "@/features/todo" ;
2019import { useAddCompleteToolCalls } from "@/lib/hooks/use-add-complete-tool-calls" ;
2120import type { useAttachmentUpload } from "@/lib/hooks/use-attachment-upload" ;
@@ -33,6 +32,7 @@ import { useChatSubmit } from "../hooks/use-chat-submit";
3332import { useInlineCompactTask } from "../hooks/use-inline-compact-task" ;
3433import { useNewCompactTask } from "../hooks/use-new-compact-task" ;
3534import type { SubtaskInfo } from "../hooks/use-subtask-info" ;
35+ import { useWalkthroughTask } from "../hooks/use-walkthrough-task" ;
3636import { ChatInputForm } from "./chat-input-form" ;
3737import { ErrorMessageView } from "./error-message-view" ;
3838import { CompleteSubtaskButton } from "./subtask" ;
@@ -41,6 +41,7 @@ interface ChatToolbarProps {
4141 task ?: Task ;
4242 approvalAndRetry : ReturnType < typeof useApprovalAndRetry > ;
4343 compact : ( ) => Promise < string > ;
44+ walkthrough : ( ) => Promise < string > ;
4445 chat : UseChatHelpers < Message > ;
4546 attachmentUpload : ReturnType < typeof useAttachmentUpload > ;
4647 isSubTask : boolean ;
@@ -54,6 +55,7 @@ export const ChatToolbar: React.FC<ChatToolbarProps> = ({
5455 chat,
5556 approvalAndRetry : { pendingApproval, retry } ,
5657 compact,
58+ walkthrough,
5759 attachmentUpload,
5860 isSubTask,
5961 subtask,
@@ -106,6 +108,9 @@ export const ChatToolbar: React.FC<ChatToolbarProps> = ({
106108 compact,
107109 } ) ;
108110
111+ const { walkthroughTask, walkthroughTaskPending } = useWalkthroughTask ( {
112+ walkthrough,
113+ } ) ;
109114 const {
110115 isExecuting,
111116 isBusyCore,
@@ -191,6 +196,11 @@ export const ChatToolbar: React.FC<ChatToolbarProps> = ({
191196 newCompactTask,
192197 newCompactTaskPending,
193198 } ;
199+ const walkthroughOptions = {
200+ enabled : ! isLoading && ! isExecuting && ! walkthroughTaskPending ,
201+ walkthroughTaskPending,
202+ walkthroughTask,
203+ } ;
194204
195205 const messageContent = useMemo (
196206 ( ) => JSON . stringify ( messages , null , 2 ) ,
@@ -290,6 +300,7 @@ export const ChatToolbar: React.FC<ChatToolbarProps> = ({
290300 totalTokens = { totalTokens }
291301 className = "mr-5"
292302 compact = { compactOptions }
303+ walkthrough = { walkthroughOptions }
293304 selectedModel = { selectedModel }
294305 />
295306 ) }
0 commit comments