Void's settings

This commit is contained in:
Andrew Pareles 2025-02-19 17:57:40 -08:00
parent 0f26ee2288
commit 62c2622ced
8 changed files with 30 additions and 11 deletions

View file

@ -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) }

View file

@ -201,6 +201,24 @@ const RenderToken = ({ token, nested = false, noSpace = false, chatMessageLocati
))}
</ListTag>
)
// attempt at indentation
// return (
// <ListTag
// start={t.start ? t.start : undefined}
// className={`pl-2 ${noSpace ? '' : 'my-4'} ${t.ordered ? "list-decimal" : "list-disc"}`}
// >
// {t.items.map((item, index) => (
// <li key={index} className={`${noSpace ? '' : 'mb-2'} ml-4`}>
// {item.task && (
// <input type="checkbox" className='mr-2 form-checkbox' checked={item.checked} readOnly />
// )}
// <span className-='inline-block pr-2'>
// <ChatMarkdownRender chatMessageLocation={chatMessageLocation} string={item.text} nested={true} />
// </span>
// </li>
// ))}
// </ListTag>
// )
}
if (t.type === "paragraph") {

View file

@ -624,7 +624,7 @@ export const Settings = () => {
<div className='max-w-5xl mx-auto'>
<h1 className='text-2xl w-full'>Void Settings</h1>
<h1 className='text-2xl w-full'>{`Void's Settings`}</h1>
{/* separator */}
<div className='w-full h-[1px] my-4' />

View file

@ -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), }]
});

View file

@ -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<IEditorPaneRegistry>(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
});

View file

@ -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

View file

@ -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]
},
}

View file

@ -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 })