From 62c2622ced39d4839017056c1ce02233bf5613fa Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Wed, 19 Feb 2025 17:57:40 -0800 Subject: [PATCH] Void's settings --- .../contrib/void/browser/editCodeService.ts | 2 +- .../react/src/markdown/ChatMarkdownRender.tsx | 18 ++++++++++++++++++ .../react/src/void-settings-tsx/Settings.tsx | 2 +- .../contrib/void/browser/sidebarActions.ts | 2 +- .../contrib/void/browser/voidSettingsPane.ts | 6 +++--- .../contrib/void/common/llmMessageService.ts | 6 +++--- .../contrib/void/common/toolsService.ts | 3 ++- .../electron-main/llmMessage/sendLLMMessage.ts | 2 +- 8 files changed, 30 insertions(+), 11 deletions(-) diff --git a/src/vs/workbench/contrib/void/browser/editCodeService.ts b/src/vs/workbench/contrib/void/browser/editCodeService.ts index 02e3fc23..c7629f89 100644 --- a/src/vs/workbench/contrib/void/browser/editCodeService.ts +++ b/src/vs/workbench/contrib/void/browser/editCodeService.ts @@ -1590,7 +1590,7 @@ class EditCodeService extends Disposable implements IEditCodeService { secondary: [{ id: 'void.onerror.opensettings', enabled: true, - label: 'Open Void settings', + label: `Open Void's settings`, tooltip: '', class: undefined, run: () => { this._commandService.executeCommand(VOID_OPEN_SETTINGS_ACTION_ID) } diff --git a/src/vs/workbench/contrib/void/browser/react/src/markdown/ChatMarkdownRender.tsx b/src/vs/workbench/contrib/void/browser/react/src/markdown/ChatMarkdownRender.tsx index 3e77a6df..7a9953b7 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/markdown/ChatMarkdownRender.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/markdown/ChatMarkdownRender.tsx @@ -201,6 +201,24 @@ const RenderToken = ({ token, nested = false, noSpace = false, chatMessageLocati ))} ) + // attempt at indentation + // return ( + // + // {t.items.map((item, index) => ( + //
  • + // {item.task && ( + // + // )} + // + // + // + //
  • + // ))} + //
    + // ) } if (t.type === "paragraph") { diff --git a/src/vs/workbench/contrib/void/browser/react/src/void-settings-tsx/Settings.tsx b/src/vs/workbench/contrib/void/browser/react/src/void-settings-tsx/Settings.tsx index 0cfdef04..fd612c43 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/void-settings-tsx/Settings.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/void-settings-tsx/Settings.tsx @@ -624,7 +624,7 @@ export const Settings = () => {
    -

    Void Settings

    +

    {`Void's Settings`}

    {/* separator */}
    diff --git a/src/vs/workbench/contrib/void/browser/sidebarActions.ts b/src/vs/workbench/contrib/void/browser/sidebarActions.ts index 2e64c53f..39eb8381 100644 --- a/src/vs/workbench/contrib/void/browser/sidebarActions.ts +++ b/src/vs/workbench/contrib/void/browser/sidebarActions.ts @@ -241,7 +241,7 @@ registerAction2(class extends Action2 { constructor() { super({ id: 'void.settingsAction', - title: 'Void Settings', + title: `Void's Settings`, icon: { id: 'settings-gear' }, menu: [{ id: MenuId.ViewTitle, group: 'navigation', when: ContextKeyExpr.equals('view', VOID_VIEW_ID), }] }); diff --git a/src/vs/workbench/contrib/void/browser/voidSettingsPane.ts b/src/vs/workbench/contrib/void/browser/voidSettingsPane.ts index 0fd8ce2e..d5e99d57 100644 --- a/src/vs/workbench/contrib/void/browser/voidSettingsPane.ts +++ b/src/vs/workbench/contrib/void/browser/voidSettingsPane.ts @@ -49,7 +49,7 @@ class VoidSettingsInput extends EditorInput { } override getName(): string { - return nls.localize('voidSettingsInputsName', 'Void Settings'); + return nls.localize('voidSettingsInputsName', 'Void\'s Settings'); } override getIcon() { @@ -112,7 +112,7 @@ class VoidSettingsPane extends EditorPane { // register Settings pane Registry.as(EditorExtensions.EditorPane).registerEditorPane( - EditorPaneDescriptor.create(VoidSettingsPane, VoidSettingsPane.ID, nls.localize('VoidSettingsPane', "Void Settings Pane")), + EditorPaneDescriptor.create(VoidSettingsPane, VoidSettingsPane.ID, nls.localize('VoidSettingsPane', "Void\'s Settings Pane")), [new SyncDescriptor(VoidSettingsInput)] ); @@ -202,7 +202,7 @@ MenuRegistry.appendMenuItem(MenuId.GlobalActivity, { group: '0_command', command: { id: VOID_TOGGLE_SETTINGS_ACTION_ID, - title: nls.localize('voidSettings', "Void Settings") + title: nls.localize('voidSettings', "Void\'s Settings") }, order: 1 }); diff --git a/src/vs/workbench/contrib/void/common/llmMessageService.ts b/src/vs/workbench/contrib/void/common/llmMessageService.ts index 314031d4..bb6cf09c 100644 --- a/src/vs/workbench/contrib/void/common/llmMessageService.ts +++ b/src/vs/workbench/contrib/void/common/llmMessageService.ts @@ -99,15 +99,15 @@ export class LLMMessageService extends Disposable implements ILLMMessageService let message: string if (isDisabled === 'addProvider' || isDisabled === 'providerNotAutoDetected') - message = `Please add a provider in Void Settings.` + message = `Please add a provider in Void's Settings.` else if (isDisabled === 'addModel') message = `Please add a model.` else if (isDisabled === 'needToEnableModel') message = `Please enable a model.` else if (isDisabled === 'notFilledIn') - message = `Please fill in Void Settings${modelSelection !== null ? ` for ${displayInfoOfProviderName(modelSelection.providerName).title}` : ''}.` + message = `Please fill in Void's Settings${modelSelection !== null ? ` for ${displayInfoOfProviderName(modelSelection.providerName).title}` : ''}.` else - message = 'Please add a provider in Void Settings.' + message = `Please add a provider in Void's Settings.` onError({ message, fullError: null }) return null diff --git a/src/vs/workbench/contrib/void/common/toolsService.ts b/src/vs/workbench/contrib/void/common/toolsService.ts index 41ab059b..dbdd0e15 100644 --- a/src/vs/workbench/contrib/void/common/toolsService.ts +++ b/src/vs/workbench/contrib/void/common/toolsService.ts @@ -23,7 +23,6 @@ export type InternalToolInfo = { required: string[], // required paramNames } -// helper const paginationHelper = { desc: `Very large results may be paginated (indicated in the result). Pagination fails gracefully if out of bounds or invalid page number.`, param: { pageNumber: { type: 'number', description: 'The page number (optional, default is 1).' }, } @@ -166,6 +165,7 @@ const validateQueryStr = (queryStr: unknown) => { // TODO!!!! check to make sure in workspace const validateURI = (uriStr: unknown) => { if (typeof uriStr !== 'string') throw new Error('Error calling tool: provided uri must be a string.') + const uri = URI.file(uriStr) return uri } @@ -270,6 +270,7 @@ export class ToolsService implements IToolsService { return [URIs, hasNextPage] }, + } diff --git a/src/vs/workbench/contrib/void/electron-main/llmMessage/sendLLMMessage.ts b/src/vs/workbench/contrib/void/electron-main/llmMessage/sendLLMMessage.ts index 8e29bff4..0a182aec 100644 --- a/src/vs/workbench/contrib/void/electron-main/llmMessage/sendLLMMessage.ts +++ b/src/vs/workbench/contrib/void/electron-main/llmMessage/sendLLMMessage.ts @@ -74,7 +74,7 @@ export const sendLLMMessage = ({ // handle failed to fetch errors, which give 0 information by design if (error === 'TypeError: fetch failed') - error = `Failed to fetch from ${displayInfoOfProviderName(providerName).title}. This likely means you specified the wrong endpoint in Void Settings, or your local model provider like Ollama is powered off.` + error = `Failed to fetch from ${displayInfoOfProviderName(providerName).title}. This likely means you specified the wrong endpoint in Void's Settings, or your local model provider like Ollama is powered off.` captureLLMEvent(`${loggingName} - Error`, { error }) onError_({ message: error, fullError })