diff --git a/src/vs/platform/void/common/configTypes.ts b/src/vs/platform/void/common/configTypes.ts index c9eac9ee..2b698fb0 100644 --- a/src/vs/platform/void/common/configTypes.ts +++ b/src/vs/platform/void/common/configTypes.ts @@ -254,7 +254,7 @@ export const displayInfoOfSettingName = (providerName: ProviderName, settingName else if (settingName === 'endpoint') { return { title: providerName === 'ollama' ? 'The endpoint of your Ollama instance.' : - providerName === 'openAICompatible' ? 'The baseUrl (exluding /chat/completions).' + providerName === 'openAICompatible' ? 'The baseUrl (excluding /chat/completions).' : '(never)', type: 'string', placeholder: providerName === 'ollama' || providerName === 'openAICompatible' ? diff --git a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx index 70168aa5..d3a7a014 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx @@ -47,7 +47,7 @@ export const SelectedFiles = (
{selections.map((selection, i) => ( - + {/* selection display summary */} - {/* selection text */} + {/* selection full text */} {type === 'staging' && selection.selectionStr && { @@ -96,9 +96,8 @@ export const SelectedFiles = ( const ChatBubble = ({ chatMessage }: { chatMessage: ChatMessage }) => { const role = chatMessage.role - const children = chatMessage.displayContent - if (!children) + if (!chatMessage.displayContent) return null let chatbubbleContents: React.ReactNode @@ -106,11 +105,11 @@ const ChatBubble = ({ chatMessage }: { chatMessage: ChatMessage }) => { if (role === 'user') { chatbubbleContents = <> - {children} + {chatMessage.displayContent} } else if (role === 'assistant') { - chatbubbleContents = // sectionsHTML + chatbubbleContents = // sectionsHTML } return
@@ -143,7 +142,6 @@ export const SidebarChat = () => { // config state const voidConfigState = useConfigState() - // threads state const threadsState = useThreadsState() const threadsStateService = useService('threadsStateService') @@ -184,15 +182,13 @@ export const SidebarChat = () => { const systemPromptElt: ChatMessage = { role: 'system', content: generateDiffInstructions } threadsStateService.addMessageToCurrentThread(systemPromptElt) - const userContent = userInstructionsStr(instructions, selections) - const userHistoryElt: ChatMessage = { role: 'user', content: userContent, displayContent: instructions, selections } + // add user's message to chat history + const userHistoryElt: ChatMessage = { role: 'user', content: userInstructionsStr(instructions, selections), displayContent: instructions, selections } threadsStateService.addMessageToCurrentThread(userHistoryElt) const currentThread = threadsStateService.getCurrentThread(threadsStateService.state) // the the instant state right now, don't wait for the React state - // send message to LLM - const object: LLMMessageServiceParams = { logging: { loggingName: 'Chat' }, messages: [...(currentThread?.messages ?? []).map(m => ({ role: m.role, content: m.content || '(null)' })),], @@ -238,7 +234,7 @@ export const SidebarChat = () => { } const onAbort = () => { - // abort the LLM + // abort the LLM call if (latestRequestIdRef.current) sendLLMMessageService.abort(latestRequestIdRef.current) @@ -263,12 +259,13 @@ export const SidebarChat = () => { {currentThread !== null && currentThread?.messages.map((message, i) => )} + {/* message stream */}
- {/* chatbar */} +
- {/* selection */} + {/* input box */}
@@ -282,8 +279,10 @@ export const SidebarChat = () => { { setLatestError(null) }} - />} + /> + } + {/* user input box */}
{ onSubmit={(e) => { console.log('submit!') onSubmit(e) - }}> + }} + > - {/* input */} + {/* text input */}