MCPcopy Index your code
hub / github.com/continuedev/continue / TUIChat

Function TUIChat

extensions/cli/src/ui/TUIChat.tsx:152–501  ·  view source on GitHub ↗
({
  remoteUrl,
  configPath,
  initialPrompt,
  resume,
  fork,
  additionalRules,
  additionalPrompts,
})

Source from the content-addressed store, hash-verified

150
151// eslint-disable-next-line complexity
152const TUIChat: React.FC<TUIChatProps> = ({
153 remoteUrl,
154 configPath,
155 initialPrompt,
156 resume,
157 fork,
158 additionalRules,
159 additionalPrompts,
160}) => {
161 // Use custom hook for services
162 const { services, allServicesReady, isRemoteMode } =
163 useTUIChatServices(remoteUrl);
164
165 // Use navigation context
166 const {
167 state: navState,
168 navigateTo,
169 closeCurrentScreen,
170 isScreenActive,
171 } = useNavigation();
172
173 // Use intro message hook
174 const [showIntroMessage, setShowIntroMessage] = useIntroMessage(
175 isRemoteMode,
176 services,
177 allServicesReady,
178 );
179
180 // State to trigger static content refresh for /clear command
181 const [staticRefreshTrigger, setStaticRefreshTrigger] = useState(0);
182
183 // Use chat handlers hook
184 const { handleClear, handleReload, resetChatHistoryRef } = useChatHandlers(
185 setShowIntroMessage,
186 setStaticRefreshTrigger,
187 );
188
189 // State for diff content overlay
190 const [diffContent, setDiffContent] = useState<string>("");
191
192 // State for temporary status message
193 const [statusMessage, setStatusMessage] = useState<string>("");
194
195 // Handler to show diff overlay
196 const handleShowDiff = useCallback(
197 (content: string) => {
198 setDiffContent(content);
199 navigateTo("diff");
200 },
201 [navigateTo],
202 );
203
204 // Handler to show temporary status message
205 const handleShowStatusMessage = useCallback((message: string) => {
206 setStatusMessage(message);
207 // Clear after 3 seconds
208 setTimeout(() => {
209 setStatusMessage("");

Callers

nothing calls this directly

Calls 15

useTUIChatServicesFunction · 0.85
useNavigationFunction · 0.85
useIntroMessageFunction · 0.85
useChatHandlersFunction · 0.85
useChatFunction · 0.85
useContextPercentageFunction · 0.85
useMessageRendererFunction · 0.85
useSelectorsFunction · 0.85
loadAndSetSessionFunction · 0.85
loadSessionByIdFunction · 0.85
setChatHistoryFunction · 0.85
useOrganizationNameFunction · 0.85

Tested by

no test coverage detected