mirror of
https://github.com/voideditor/void
synced 2026-05-24 09:58:23 +00:00
sweep to fix lint
This commit is contained in:
parent
176d302258
commit
9aae56682e
5 changed files with 104 additions and 109 deletions
|
|
@ -68,9 +68,7 @@ export const SidebarThreadSelector = () => {
|
|||
let firstMsg = null;
|
||||
// let secondMsg = null;
|
||||
|
||||
const firstUserMsgIdx = pastThread.messages.findIndex(
|
||||
(msg) => msg.role !== 'system' && msg.role !== 'tool' && !!msg.displayContent
|
||||
);
|
||||
const firstUserMsgIdx = pastThread.messages.findIndex((msg) => msg.role !== 'tool' && msg.role !== 'tool_request');
|
||||
|
||||
if (firstUserMsgIdx !== -1) {
|
||||
// firstMsg = truncate(pastThread.messages[firstMsgIdx].displayContent ?? '');
|
||||
|
|
@ -88,9 +86,7 @@ export const SidebarThreadSelector = () => {
|
|||
// secondMsg = truncate(pastThread.messages[secondMsgIdx].displayContent ?? '');
|
||||
// }
|
||||
|
||||
const numMessages = pastThread.messages.filter(
|
||||
(msg) => msg.role !== 'system'
|
||||
).length;
|
||||
const numMessages = pastThread.messages.filter((msg) => msg.role !== 'tool_request').length;
|
||||
|
||||
return (
|
||||
<li key={pastThread.id}>
|
||||
|
|
|
|||
|
|
@ -27,141 +27,141 @@ module.exports = {
|
|||
// common colors to use, ordered light to dark
|
||||
|
||||
colors: {
|
||||
"void-bg-1": "var(--vscode-input-background)",
|
||||
"void-bg-1-alt": "var(--vscode-badge-background)",
|
||||
"void-bg-2": "var(--vscode-sideBar-background)",
|
||||
"void-bg-2-alt": "color-mix(in srgb, var(--vscode-sideBar-background) 30%, var(--vscode-editor-background) 70%)",
|
||||
"void-bg-3": "var(--vscode-editor-background)",
|
||||
'void-bg-1': 'var(--vscode-input-background)',
|
||||
'void-bg-1-alt': 'var(--vscode-badge-background)',
|
||||
'void-bg-2': 'var(--vscode-sideBar-background)',
|
||||
'void-bg-2-alt': 'color-mix(in srgb, var(--vscode-sideBar-background) 30%, var(--vscode-editor-background) 70%)',
|
||||
'void-bg-3': 'var(--vscode-editor-background)',
|
||||
|
||||
|
||||
"void-fg-1": "var(--vscode-editor-foreground)",
|
||||
"void-fg-2": "var(--vscode-input-foreground)",
|
||||
"void-fg-3": "var(--vscode-input-placeholderForeground)",
|
||||
// "void-fg-4": "var(--vscode-tab-inactiveForeground)",
|
||||
"void-fg-4": "var(--vscode-list-deemphasizedForeground)",
|
||||
'void-fg-1': 'var(--vscode-editor-foreground)',
|
||||
'void-fg-2': 'var(--vscode-input-foreground)',
|
||||
'void-fg-3': 'var(--vscode-input-placeholderForeground)',
|
||||
// 'void-fg-4': 'var(--vscode-tab-inactiveForeground)',
|
||||
'void-fg-4': 'var(--vscode-list-deemphasizedForeground)',
|
||||
|
||||
|
||||
"void-warning": "var(--vscode-charts-yellow)",
|
||||
'void-warning': 'var(--vscode-charts-yellow)',
|
||||
|
||||
"void-border-1": "var(--vscode-commandCenter-activeBorder)",
|
||||
"void-border-2": "var(--vscode-commandCenter-border)",
|
||||
"void-border-3": "var(--vscode-commandCenter-inactiveBorder)",
|
||||
"void-border-4": "var(--vscode-editorGroup-border)",
|
||||
'void-border-1': 'var(--vscode-commandCenter-activeBorder)',
|
||||
'void-border-2': 'var(--vscode-commandCenter-border)',
|
||||
'void-border-3': 'var(--vscode-commandCenter-inactiveBorder)',
|
||||
'void-border-4': 'var(--vscode-editorGroup-border)',
|
||||
|
||||
|
||||
vscode: {
|
||||
// see: https://code.visualstudio.com/api/extension-guides/webview#theming-webview-content
|
||||
|
||||
// base colors
|
||||
"fg": "var(--vscode-foreground)",
|
||||
"focus-border": "var(--vscode-focusBorder)",
|
||||
"disabled-fg": "var(--vscode-disabledForeground)",
|
||||
"widget-border": "var(--vscode-widget-border)",
|
||||
"widget-shadow": "var(--vscode-widget-shadow)",
|
||||
"selection-bg": "var(--vscode-selection-background)",
|
||||
"description-fg": "var(--vscode-descriptionForeground)",
|
||||
"error-fg": "var(--vscode-errorForeground)",
|
||||
"icon-fg": "var(--vscode-icon-foreground)",
|
||||
"sash-hover-border": "var(--vscode-sash-hoverBorder)",
|
||||
'fg': 'var(--vscode-foreground)',
|
||||
'focus-border': 'var(--vscode-focusBorder)',
|
||||
'disabled-fg': 'var(--vscode-disabledForeground)',
|
||||
'widget-border': 'var(--vscode-widget-border)',
|
||||
'widget-shadow': 'var(--vscode-widget-shadow)',
|
||||
'selection-bg': 'var(--vscode-selection-background)',
|
||||
'description-fg': 'var(--vscode-descriptionForeground)',
|
||||
'error-fg': 'var(--vscode-errorForeground)',
|
||||
'icon-fg': 'var(--vscode-icon-foreground)',
|
||||
'sash-hover-border': 'var(--vscode-sash-hoverBorder)',
|
||||
|
||||
// text colors
|
||||
"text-blockquote-bg": "var(--vscode-textBlockQuote-background)",
|
||||
"text-blockquote-border": "var(--vscode-textBlockQuote-border)",
|
||||
"text-codeblock-bg": "var(--vscode-textCodeBlock-background)",
|
||||
"text-link-active-fg": "var(--vscode-textLink-activeForeground)",
|
||||
"text-link-fg": "var(--vscode-textLink-foreground)",
|
||||
"text-preformat-fg": "var(--vscode-textPreformat-foreground)",
|
||||
"text-preformat-bg": "var(--vscode-textPreformat-background)",
|
||||
"text-separator-fg": "var(--vscode-textSeparator-foreground)",
|
||||
'text-blockquote-bg': 'var(--vscode-textBlockQuote-background)',
|
||||
'text-blockquote-border': 'var(--vscode-textBlockQuote-border)',
|
||||
'text-codeblock-bg': 'var(--vscode-textCodeBlock-background)',
|
||||
'text-link-active-fg': 'var(--vscode-textLink-activeForeground)',
|
||||
'text-link-fg': 'var(--vscode-textLink-foreground)',
|
||||
'text-preformat-fg': 'var(--vscode-textPreformat-foreground)',
|
||||
'text-preformat-bg': 'var(--vscode-textPreformat-background)',
|
||||
'text-separator-fg': 'var(--vscode-textSeparator-foreground)',
|
||||
|
||||
// input colors
|
||||
"input-bg": "var(--vscode-input-background)",
|
||||
"input-border": "var(--vscode-input-border)",
|
||||
"input-fg": "var(--vscode-input-foreground)",
|
||||
"input-placeholder-fg": "var(--vscode-input-placeholderForeground)",
|
||||
"input-active-bg": "var(--vscode-input-activeBackground)",
|
||||
"input-option-active-border": "var(--vscode-inputOption-activeBorder)",
|
||||
"input-option-active-fg": "var(--vscode-inputOption-activeForeground)",
|
||||
"input-option-hover-bg": "var(--vscode-inputOption-hoverBackground)",
|
||||
"input-validation-error-bg": "var(--vscode-inputValidation-errorBackground)",
|
||||
"input-validation-error-fg": "var(--vscode-inputValidation-errorForeground)",
|
||||
"input-validation-error-border": "var(--vscode-inputValidation-errorBorder)",
|
||||
"input-validation-info-bg": "var(--vscode-inputValidation-infoBackground)",
|
||||
"input-validation-info-fg": "var(--vscode-inputValidation-infoForeground)",
|
||||
"input-validation-info-border": "var(--vscode-inputValidation-infoBorder)",
|
||||
"input-validation-warning-bg": "var(--vscode-inputValidation-warningBackground)",
|
||||
"input-validation-warning-fg": "var(--vscode-inputValidation-warningForeground)",
|
||||
"input-validation-warning-border": "var(--vscode-inputValidation-warningBorder)",
|
||||
'input-bg': 'var(--vscode-input-background)',
|
||||
'input-border': 'var(--vscode-input-border)',
|
||||
'input-fg': 'var(--vscode-input-foreground)',
|
||||
'input-placeholder-fg': 'var(--vscode-input-placeholderForeground)',
|
||||
'input-active-bg': 'var(--vscode-input-activeBackground)',
|
||||
'input-option-active-border': 'var(--vscode-inputOption-activeBorder)',
|
||||
'input-option-active-fg': 'var(--vscode-inputOption-activeForeground)',
|
||||
'input-option-hover-bg': 'var(--vscode-inputOption-hoverBackground)',
|
||||
'input-validation-error-bg': 'var(--vscode-inputValidation-errorBackground)',
|
||||
'input-validation-error-fg': 'var(--vscode-inputValidation-errorForeground)',
|
||||
'input-validation-error-border': 'var(--vscode-inputValidation-errorBorder)',
|
||||
'input-validation-info-bg': 'var(--vscode-inputValidation-infoBackground)',
|
||||
'input-validation-info-fg': 'var(--vscode-inputValidation-infoForeground)',
|
||||
'input-validation-info-border': 'var(--vscode-inputValidation-infoBorder)',
|
||||
'input-validation-warning-bg': 'var(--vscode-inputValidation-warningBackground)',
|
||||
'input-validation-warning-fg': 'var(--vscode-inputValidation-warningForeground)',
|
||||
'input-validation-warning-border': 'var(--vscode-inputValidation-warningBorder)',
|
||||
|
||||
// command center colors (the top bar)
|
||||
"commandcenter-fg": "var(--vscode-commandCenter-foreground)",
|
||||
"commandcenter-active-fg": "var(--vscode-commandCenter-activeForeground)",
|
||||
"commandcenter-bg": "var(--vscode-commandCenter-background)",
|
||||
"commandcenter-active-bg": "var(--vscode-commandCenter-activeBackground)",
|
||||
"commandcenter-border": "var(--vscode-commandCenter-border)",
|
||||
"commandcenter-inactive-fg": "var(--vscode-commandCenter-inactiveForeground)",
|
||||
"commandcenter-inactive-border": "var(--vscode-commandCenter-inactiveBorder)",
|
||||
"commandcenter-active-border": "var(--vscode-commandCenter-activeBorder)",
|
||||
"commandcenter-debugging-bg": "var(--vscode-commandCenter-debuggingBackground)",
|
||||
'commandcenter-fg': 'var(--vscode-commandCenter-foreground)',
|
||||
'commandcenter-active-fg': 'var(--vscode-commandCenter-activeForeground)',
|
||||
'commandcenter-bg': 'var(--vscode-commandCenter-background)',
|
||||
'commandcenter-active-bg': 'var(--vscode-commandCenter-activeBackground)',
|
||||
'commandcenter-border': 'var(--vscode-commandCenter-border)',
|
||||
'commandcenter-inactive-fg': 'var(--vscode-commandCenter-inactiveForeground)',
|
||||
'commandcenter-inactive-border': 'var(--vscode-commandCenter-inactiveBorder)',
|
||||
'commandcenter-active-border': 'var(--vscode-commandCenter-activeBorder)',
|
||||
'commandcenter-debugging-bg': 'var(--vscode-commandCenter-debuggingBackground)',
|
||||
|
||||
// badge colors
|
||||
"badge-fg": "var(--vscode-badge-foreground)",
|
||||
"badge-bg": "var(--vscode-badge-background)",
|
||||
'badge-fg': 'var(--vscode-badge-foreground)',
|
||||
'badge-bg': 'var(--vscode-badge-background)',
|
||||
|
||||
// button colors
|
||||
"button-bg": "var(--vscode-button-background)",
|
||||
"button-fg": "var(--vscode-button-foreground)",
|
||||
"button-border": "var(--vscode-button-border)",
|
||||
"button-separator": "var(--vscode-button-separator)",
|
||||
"button-hover-bg": "var(--vscode-button-hoverBackground)",
|
||||
"button-secondary-fg": "var(--vscode-button-secondaryForeground)",
|
||||
"button-secondary-bg": "var(--vscode-button-secondaryBackground)",
|
||||
"button-secondary-hover-bg": "var(--vscode-button-secondaryHoverBackground)",
|
||||
'button-bg': 'var(--vscode-button-background)',
|
||||
'button-fg': 'var(--vscode-button-foreground)',
|
||||
'button-border': 'var(--vscode-button-border)',
|
||||
'button-separator': 'var(--vscode-button-separator)',
|
||||
'button-hover-bg': 'var(--vscode-button-hoverBackground)',
|
||||
'button-secondary-fg': 'var(--vscode-button-secondaryForeground)',
|
||||
'button-secondary-bg': 'var(--vscode-button-secondaryBackground)',
|
||||
'button-secondary-hover-bg': 'var(--vscode-button-secondaryHoverBackground)',
|
||||
|
||||
// checkbox colors
|
||||
"checkbox-bg": "var(--vscode-checkbox-background)",
|
||||
"checkbox-fg": "var(--vscode-checkbox-foreground)",
|
||||
"checkbox-border": "var(--vscode-checkbox-border)",
|
||||
"checkbox-select-bg": "var(--vscode-checkbox-selectBackground)",
|
||||
'checkbox-bg': 'var(--vscode-checkbox-background)',
|
||||
'checkbox-fg': 'var(--vscode-checkbox-foreground)',
|
||||
'checkbox-border': 'var(--vscode-checkbox-border)',
|
||||
'checkbox-select-bg': 'var(--vscode-checkbox-selectBackground)',
|
||||
|
||||
// sidebar colors
|
||||
"sidebar-bg": "var(--vscode-sideBar-background)",
|
||||
"sidebar-fg": "var(--vscode-sideBar-foreground)",
|
||||
"sidebar-border": "var(--vscode-sideBar-border)",
|
||||
"sidebar-drop-bg": "var(--vscode-sideBar-dropBackground)",
|
||||
"sidebar-title-fg": "var(--vscode-sideBarTitle-foreground)",
|
||||
"sidebar-header-bg": "var(--vscode-sideBarSectionHeader-background)",
|
||||
"sidebar-header-fg": "var(--vscode-sideBarSectionHeader-foreground)",
|
||||
"sidebar-header-border": "var(--vscode-sideBarSectionHeader-border)",
|
||||
"sidebar-activitybartop-border": "var(--vscode-sideBarActivityBarTop-border)",
|
||||
"sidebar-title-bg": "var(--vscode-sideBarTitle-background)",
|
||||
"sidebar-title-border": "var(--vscode-sideBarTitle-border)",
|
||||
"sidebar-stickyscroll-bg": "var(--vscode-sideBarStickyScroll-background)",
|
||||
"sidebar-stickyscroll-border": "var(--vscode-sideBarStickyScroll-border)",
|
||||
"sidebar-stickyscroll-shadow": "var(--vscode-sideBarStickyScroll-shadow)",
|
||||
'sidebar-bg': 'var(--vscode-sideBar-background)',
|
||||
'sidebar-fg': 'var(--vscode-sideBar-foreground)',
|
||||
'sidebar-border': 'var(--vscode-sideBar-border)',
|
||||
'sidebar-drop-bg': 'var(--vscode-sideBar-dropBackground)',
|
||||
'sidebar-title-fg': 'var(--vscode-sideBarTitle-foreground)',
|
||||
'sidebar-header-bg': 'var(--vscode-sideBarSectionHeader-background)',
|
||||
'sidebar-header-fg': 'var(--vscode-sideBarSectionHeader-foreground)',
|
||||
'sidebar-header-border': 'var(--vscode-sideBarSectionHeader-border)',
|
||||
'sidebar-activitybartop-border': 'var(--vscode-sideBarActivityBarTop-border)',
|
||||
'sidebar-title-bg': 'var(--vscode-sideBarTitle-background)',
|
||||
'sidebar-title-border': 'var(--vscode-sideBarTitle-border)',
|
||||
'sidebar-stickyscroll-bg': 'var(--vscode-sideBarStickyScroll-background)',
|
||||
'sidebar-stickyscroll-border': 'var(--vscode-sideBarStickyScroll-border)',
|
||||
'sidebar-stickyscroll-shadow': 'var(--vscode-sideBarStickyScroll-shadow)',
|
||||
|
||||
// other colors (these are partially complete)
|
||||
|
||||
// text formatting
|
||||
"text-preformat-bg": "var(--vscode-textPreformat-background)",
|
||||
"text-preformat-fg": "var(--vscode-textPreformat-foreground)",
|
||||
'text-preformat-bg': 'var(--vscode-textPreformat-background)',
|
||||
'text-preformat-fg': 'var(--vscode-textPreformat-foreground)',
|
||||
|
||||
// editor colors
|
||||
"editor-bg": "var(--vscode-editor-background)",
|
||||
"editor-fg": "var(--vscode-editor-foreground)",
|
||||
'editor-bg': 'var(--vscode-editor-background)',
|
||||
'editor-fg': 'var(--vscode-editor-foreground)',
|
||||
|
||||
|
||||
|
||||
// other
|
||||
"editorwidget-bg": "var(--vscode-editorWidget-background)",
|
||||
"toolbar-hover-bg": "var(--vscode-toolbar-hoverBackground)",
|
||||
"toolbar-foreground": "var(--vscode-editorActionList-foreground)",
|
||||
'editorwidget-bg': 'var(--vscode-editorWidget-background)',
|
||||
'toolbar-hover-bg': 'var(--vscode-toolbar-hoverBackground)',
|
||||
'toolbar-foreground': 'var(--vscode-editorActionList-foreground)',
|
||||
|
||||
"editorwidget-fg": "var(--vscode-editorWidget-foreground)",
|
||||
"editorwidget-border": "var(--vscode-editorWidget-border)",
|
||||
'editorwidget-fg': 'var(--vscode-editorWidget-foreground)',
|
||||
'editorwidget-border': 'var(--vscode-editorWidget-border)',
|
||||
|
||||
"charts-orange": "var(--vscode-charts-orange)",
|
||||
"charts-yellow": "var(--vscode-charts-yellow)",
|
||||
'charts-orange': 'var(--vscode-charts-orange)',
|
||||
'charts-yellow': 'var(--vscode-charts-yellow)',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
* Licensed under the Apache License, Version 2.0. See LICENSE.txt for more information.
|
||||
*--------------------------------------------------------------------------------------*/
|
||||
|
||||
import { ChatMessage } from '../browser/chatThreadService.js'
|
||||
import { InternalToolInfo, ToolName } from '../browser/toolsService.js'
|
||||
import type { ChatMessage } from '../browser/chatThreadService.js'
|
||||
import type { InternalToolInfo, ToolName } from '../browser/toolsService.js'
|
||||
import { FeatureName, ProviderName, SettingsOfProvider } from './voidSettingsTypes.js'
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,12 +3,11 @@
|
|||
* Licensed under the Apache License, Version 2.0. See LICENSE.txt for more information.
|
||||
*--------------------------------------------------------------------------------------*/
|
||||
|
||||
import { createDecorator } from '../../../../platform/instantiation/common/instantiation.js';
|
||||
import { createDecorator, ServicesAccessor } from '../../../../platform/instantiation/common/instantiation.js';
|
||||
import { ProxyChannel } from '../../../../base/parts/ipc/common/ipc.js';
|
||||
import { registerSingleton, InstantiationType } from '../../../../platform/instantiation/common/extensions.js';
|
||||
import { IMainProcessService } from '../../../../platform/ipc/common/mainProcessService.js';
|
||||
import { localize2 } from '../../../../nls.js';
|
||||
import { ServicesAccessor } from '../../../../editor/browser/editorExtensions.js';
|
||||
import { registerAction2, Action2 } from '../../../../platform/actions/common/actions.js';
|
||||
import { INotificationService } from '../../../../platform/notification/common/notification.js';
|
||||
|
||||
|
|
|
|||
|
|
@ -271,7 +271,7 @@ const prepareMessages_tools = ({ messages, supportsTools }: { messages: LLMChatM
|
|||
return prepareMessages_tools_openai({ messages })
|
||||
}
|
||||
else {
|
||||
throw 1
|
||||
throw new Error(`supportsTools type not recognized`)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue