@@ -46,7 +46,11 @@ import { getProjectRoot } from './project-files'
4646import { useChatStore } from './state/chat-store'
4747import { useFeedbackStore } from './state/feedback-store'
4848import { usePublishStore } from './state/publish-store'
49- import { addClipboardPlaceholder , addPendingImageFromFile , validateAndAddImage } from './utils/add-pending-image'
49+ import {
50+ addClipboardPlaceholder ,
51+ addPendingImageFromFile ,
52+ validateAndAddImage ,
53+ } from './utils/add-pending-image'
5054import { createChatScrollAcceleration } from './utils/chat-scroll-accel'
5155import { showClipboardMessage } from './utils/clipboard'
5256import { readClipboardImage } from './utils/clipboard-image'
@@ -80,7 +84,6 @@ export const Chat = ({
8084 headerContent,
8185 initialPrompt,
8286 agentId,
83- validationErrors,
8487 fileTree,
8588 inputRef,
8689 setIsAuthenticated,
@@ -93,7 +96,6 @@ export const Chat = ({
9396 headerContent : React . ReactNode
9497 initialPrompt : string | null
9598 agentId ?: string
96- validationErrors : Array < { id : string ; message : string } >
9799 fileTree : FileTreeNode [ ]
98100 inputRef : React . MutableRefObject < MultilineInputHandle | null >
99101 setIsAuthenticated : Dispatch < SetStateAction < boolean | null > >
@@ -124,7 +126,7 @@ export const Chat = ({
124126 const theme = useTheme ( )
125127 const markdownPalette = useMemo ( ( ) => createMarkdownPalette ( theme ) , [ theme ] )
126128
127- const { validate : validateAgents } = useAgentValidation ( validationErrors )
129+ const { validate : validateAgents } = useAgentValidation ( )
128130
129131 // Subscribe to ask_user bridge to trigger form display
130132 useAskUserBridge ( )
@@ -396,7 +398,6 @@ export const Chat = ({
396398 const setInputMode = useChatStore ( ( state ) => state . setInputMode )
397399 const askUserState = useChatStore ( ( state ) => state . askUserState )
398400
399-
400401 const {
401402 slashContext,
402403 mentionContext,
@@ -563,7 +564,7 @@ export const Chat = ({
563564 const ghostModeMessages = pendingBashMessages . filter (
564565 ( msg ) => ! msg . isRunning && ! msg . addedToHistory ,
565566 )
566-
567+
567568 // Add ghost mode messages to UI history
568569 for ( const msg of ghostModeMessages ) {
569570 addBashMessageToHistory ( {
@@ -575,7 +576,7 @@ export const Chat = ({
575576 setMessages,
576577 } )
577578 }
578-
579+
579580 // Mark ghost mode messages as added to history (so they don't show as ghost UI)
580581 // but keep them in pendingBashMessages so they get sent to LLM with next user message
581582 if ( ghostModeMessages . length > 0 ) {
@@ -654,7 +655,13 @@ export const Chat = ({
654655 } )
655656 setSlashSelectedIndex ( 0 )
656657 } ,
657- [ slashMatches , slashContext , inputValue , setInputValue , setSlashSelectedIndex ] ,
658+ [
659+ slashMatches ,
660+ slashContext ,
661+ inputValue ,
662+ setInputValue ,
663+ setSlashSelectedIndex ,
664+ ] ,
658665 )
659666
660667 const handleMentionItemClick = useCallback (
@@ -722,19 +729,15 @@ export const Chat = ({
722729 } ) ) ,
723730 )
724731
725- const {
726- publishMode,
727- openPublishMode,
728- closePublish,
729- preSelectAgents,
730- } = usePublishStore (
731- useShallow ( ( state ) => ( {
732- publishMode : state . publishMode ,
733- openPublishMode : state . openPublishMode ,
734- closePublish : state . closePublish ,
735- preSelectAgents : state . preSelectAgents ,
736- } ) ) ,
737- )
732+ const { publishMode, openPublishMode, closePublish, preSelectAgents } =
733+ usePublishStore (
734+ useShallow ( ( state ) => ( {
735+ publishMode : state . publishMode ,
736+ openPublishMode : state . openPublishMode ,
737+ closePublish : state . closePublish ,
738+ preSelectAgents : state . preSelectAgents ,
739+ } ) ) ,
740+ )
738741
739742 const publishMutation = usePublishMutation ( )
740743
@@ -1280,10 +1283,7 @@ export const Chat = ({
12801283 { pendingBashMessages
12811284 . filter ( ( msg ) => ! msg . addedToHistory )
12821285 . map ( ( msg ) => (
1283- < PendingBashMessage
1284- key = { `pending-bash-${ msg . id } ` }
1285- message = { msg }
1286- />
1286+ < PendingBashMessage key = { `pending-bash-${ msg . id } ` } message = { msg } />
12871287 ) ) }
12881288 </ scrollbox >
12891289
0 commit comments