mirror of
https://github.com/voideditor/void
synced 2026-05-24 01:48:25 +00:00
color
This commit is contained in:
parent
ce634eadaa
commit
da247c6ed4
3 changed files with 14 additions and 12 deletions
|
|
@ -130,7 +130,12 @@ export const QuickEditChat = ({ diffareaid, onGetInputBox, onUserUpdateText, onC
|
|||
{/* input */}
|
||||
<div // copied from SidebarChat.tsx
|
||||
className={`w-full
|
||||
@@[&_textarea]:!void-bg-transparent @@[&_textarea]:!void-outline-none @@[&_textarea]:!void-text-vscode-input-fg @@[&_div.monaco-inputbox]:!void-outline-none`}>
|
||||
@@[&_textarea]:!void-bg-transparent
|
||||
@@[&_textarea]:!void-outline-none
|
||||
@@[&_textarea]:!void-text-vscode-input-fg
|
||||
@@[&_div.monaco-inputbox]:!void-outline-none
|
||||
`}
|
||||
>
|
||||
{/* text input */}
|
||||
<VoidInputBox
|
||||
placeholder={`${keybindingString} to select`}
|
||||
|
|
|
|||
|
|
@ -59,23 +59,20 @@ export const SidebarThreadSelector = () => {
|
|||
return <>Error: Threads not found.</>
|
||||
const pastThread = allThreads[threadId]
|
||||
|
||||
let btnStringArr: string[] = []
|
||||
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)
|
||||
btnStringArr.push(truncate(allThreads[threadId].messages[firstMsgIdx].displayContent ?? ''))
|
||||
firstMsg = truncate(allThreads[threadId].messages[firstMsgIdx].displayContent ?? '')
|
||||
else
|
||||
btnStringArr.push('""')
|
||||
firstMsg = '""'
|
||||
|
||||
const secondMsgIdx = allThreads[threadId].messages.findIndex((msg, i) => msg.role !== 'system' && !!msg.displayContent && i > firstMsgIdx) ?? ''
|
||||
if (secondMsgIdx !== -1)
|
||||
btnStringArr.push(truncate(allThreads[threadId].messages[secondMsgIdx].displayContent ?? ''))
|
||||
secondMsg = truncate(allThreads[threadId].messages[secondMsgIdx].displayContent ?? '')
|
||||
|
||||
const numMessagesRemaining = allThreads[threadId].messages.filter((msg, i) => msg.role !== 'system' && !!msg.displayContent && i > secondMsgIdx).length
|
||||
if (numMessagesRemaining > 0)
|
||||
btnStringArr.push(numMessagesRemaining + '')
|
||||
|
||||
const btnString = btnStringArr.join(' / ')
|
||||
const numMessages = allThreads[threadId].messages.filter((msg, i) => msg.role !== 'system').length
|
||||
|
||||
return (
|
||||
<button
|
||||
|
|
@ -84,7 +81,7 @@ export const SidebarThreadSelector = () => {
|
|||
onClick={() => threadsStateService.switchToThread(pastThread.id)}
|
||||
title={new Date(pastThread.createdAt).toLocaleString()}
|
||||
>
|
||||
{btnString}
|
||||
{`${firstMsg} (${numMessages})`}
|
||||
</button>
|
||||
)
|
||||
})}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ const ModelSelectBox = ({ options, featureName }: { options: ModelOption[], feat
|
|||
let weChangedText = false
|
||||
|
||||
return <VoidSelectBox
|
||||
className='@@[&_select]:!void-text-xs'
|
||||
className='@@[&_select]:!void-text-xs text-void-fg-3'
|
||||
options={options}
|
||||
onChangeSelection={useCallback((newVal: ModelSelection) => {
|
||||
if (weChangedText) return
|
||||
|
|
|
|||
Loading…
Reference in a new issue