diff --git a/src/vs/workbench/contrib/cortexide/browser/react/src/sidebar-tsx/ErrorDisplay.tsx b/src/vs/workbench/contrib/cortexide/browser/react/src/sidebar-tsx/ErrorDisplay.tsx index d7787175780..b31b44963cb 100644 --- a/src/vs/workbench/contrib/cortexide/browser/react/src/sidebar-tsx/ErrorDisplay.tsx +++ b/src/vs/workbench/contrib/cortexide/browser/react/src/sidebar-tsx/ErrorDisplay.tsx @@ -50,40 +50,45 @@ export const ErrorDisplay = ({ const message = normalizedMessage + '' return ( -
+
{/* Header */} -
-
- -
-

+
+
+ +
+

{/* eg Error */} Error

-

+

{/* eg Something went wrong */} {message}

-
+
{isExpandable && ( - )} {showDismiss && onDismiss && ( - )}
@@ -94,7 +99,7 @@ export const ErrorDisplay = ({
{onRetry && ( } @@ -1607,7 +1662,12 @@ const AssistantMessageComponent = React.memo(({ chatMessage, isCheckpointGhost, {/* assistant message */} {chatMessage.displayContent && -
+
+ {!isCommitted && }
} @@ -1636,7 +1697,7 @@ const ReasoningWrapper = ({ isDoneReasoning, isStreaming, children }: { isDoneRe useEffect(() => { if (!isWriting) setIsOpen(false) // if just finished reasoning, close }, [isWriting]) - return : ''} isOpen={isOpen} onClick={() => setIsOpen(v => !v)}> + return : ''} isOpen={isOpen} onClick={() => setIsOpen(v => !v)}>
{children} @@ -1651,9 +1712,9 @@ const ReasoningWrapper = ({ isDoneReasoning, isStreaming, children }: { isDoneRe // should either be past or "-ing" tense, not present tense. Eg. when the LLM searches for something, the user expects it to say "I searched for X" or "I am searching for X". Not "I search X". const loadingTitleWrapper = (item: React.ReactNode): React.ReactNode => { - return + return {item} - + } @@ -2750,7 +2811,7 @@ const builtinToolNameToComponent: { [T in BuiltinToolName]: { resultWrapper: Res const componentParams: ToolHeaderParams = { title, desc1, desc1Info, isError: false, icon, isRejected: false } componentParams.children =
- + Searching the web...
@@ -2825,7 +2886,7 @@ const builtinToolNameToComponent: { [T in BuiltinToolName]: { resultWrapper: Res const componentParams: ToolHeaderParams = { title, desc1, desc1Info, isError: false, icon, isRejected: false } componentParams.children =
- + Fetching content from URL...
@@ -3490,7 +3551,9 @@ const ReviewComponent = ({ message, isCheckpointGhost }: { message: ReviewMessag const ChatBubble = React.memo((props: ChatBubbleProps) => { return - <_ChatBubble {...props} /> +
+ <_ChatBubble {...props} /> +
}, (prev, next) => { // Custom comparison: only re-render if props actually changed @@ -3873,11 +3936,11 @@ const EditToolSoFar = ({ toolCallSoFar, }: { toolCallSoFar: RawToolCallObj }) => const title = titleOfBuiltinToolName[toolCallSoFar.name].proposed const uriDone = toolCallSoFar.doneParams.includes('uri') - const desc1 = + const desc1 = {uriDone ? getBasename(toolCallSoFar.rawParams['uri'] ?? 'unknown') : `Generating`} - + const desc1OnClick = () => { uri && voidOpenFileFn(uri, accessor) } @@ -3893,7 +3956,7 @@ const EditToolSoFar = ({ toolCallSoFar, }: { toolCallSoFar: RawToolCallObj }) => code={toolCallSoFar.rawParams.search_replace_blocks ?? toolCallSoFar.rawParams.new_content ?? ''} type={'rewrite'} // as it streams, show in rewrite format, don't make a diff editor /> - + } @@ -4447,24 +4510,39 @@ export const SidebarChat = () => { {/* Generating tool */} {generatingTool} - {/* loading indicator with token count */} - {(isRunning === 'LLM' || isRunning === 'preparing') ? - - : null} + {/* loading indicator with status message - only show when no content is streaming yet */} + {(isRunning === 'LLM' || isRunning === 'preparing') && !displayContentSoFar && !reasoningSoFar ? ( + +
+ {isRunning === 'preparing' && currThreadStreamState?.llmInfo?.displayContentSoFar ? ( + <> + {currThreadStreamState.llmInfo.displayContentSoFar} + + + ) : isRunning === 'preparing' ? ( + <> + Preparing request + + + ) : ( + <> + Generating response + + + )} +
+
+ ) : null} {/* error message */} {latestError === undefined ? null : -
+
{transferState.type === 'done' ? `Transfer from ${fromEditor}` - : transferState.type === 'loading' ? Transferring + : transferState.type === 'loading' ? Transferring : transferState.type === 'justfinished' ? : null }