mirror of
https://github.com/voideditor/void
synced 2026-05-24 09:58:23 +00:00
settings improve
This commit is contained in:
parent
ebd78a902d
commit
a1da8bd12f
3 changed files with 10 additions and 5 deletions
|
|
@ -64,6 +64,11 @@ const CodeButtonsOnHover = ({ text }: { text: string }) => {
|
|||
</>
|
||||
}
|
||||
|
||||
export const CodeSpan = ({ children, className }: { children: React.ReactNode, className?: string }) => {
|
||||
return <code className={`text-vscode-text-preformat-fg bg-vscode-text-preformat-bg px-1 rounded-sm font-mono ${className}`}>
|
||||
{children}
|
||||
</code>
|
||||
}
|
||||
|
||||
const RenderToken = ({ token, nested = false }: { token: Token | string, nested?: boolean }): JSX.Element => {
|
||||
|
||||
|
|
@ -197,9 +202,9 @@ const RenderToken = ({ token, nested = false }: { token: Token | string, nested?
|
|||
// inline code
|
||||
if (t.type === "codespan") {
|
||||
return (
|
||||
<code className="text-vscode-text-preformat-fg bg-vscode-text-preformat-bg px-1 rounded-sm font-mono">
|
||||
<CodeSpan>
|
||||
{t.text}
|
||||
</code>
|
||||
</CodeSpan>
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -59,8 +59,8 @@ export const SidebarThreadSelector = () => {
|
|||
return <>Error: Threads not found.</>
|
||||
const pastThread = allThreads[threadId]
|
||||
|
||||
let firstMsg:string|null = null
|
||||
let secondMsg:string|null = null
|
||||
let firstMsg: string | null = null
|
||||
let secondMsg: string | null = null
|
||||
|
||||
const firstMsgIdx = allThreads[threadId].messages.findIndex(msg => msg.role !== 'system' && !!msg.displayContent) ?? ''
|
||||
if (firstMsgIdx !== -1)
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import ErrorBoundary from '../sidebar-tsx/ErrorBoundary.js'
|
|||
import { VoidButton, VoidCheckBox, VoidCustomSelectBox, VoidInputBox, VoidSwitch } from '../util/inputs.js'
|
||||
import { useAccessor, useIsDark, useRefreshModelListener, useRefreshModelState, useSettingsState } from '../util/services.js'
|
||||
import { X, RefreshCw, Loader2, Check, MoveRight } from 'lucide-react'
|
||||
import { ChatMarkdownRender } from '../markdown/ChatMarkdownRender.js'
|
||||
import { ChatMarkdownRender, CodeSpan } from '../markdown/ChatMarkdownRender.js'
|
||||
import { useScrollbarStyles } from '../util/useScrollbarStyles.js'
|
||||
import { isWindows, isLinux, isMacintosh } from '../../../../../../../base/common/platform.js'
|
||||
import { URI } from '../../../../../../../base/common/uri.js'
|
||||
|
|
|
|||
Loading…
Reference in a new issue