mirror of
https://github.com/voideditor/void
synced 2026-05-24 09:58:23 +00:00
merge
This commit is contained in:
parent
966470cf68
commit
951da8e31a
3 changed files with 12 additions and 3 deletions
|
|
@ -405,14 +405,15 @@ const ChatBubble = ({ chatMessage, isLoading }: {
|
|||
return <div
|
||||
// align chatbubble accoridng to role
|
||||
className={`
|
||||
${role === 'user' ? 'px-2 self-end w-fit' : ''}
|
||||
${role === 'assistant' ? 'self-start w-full' : ''}
|
||||
${role === 'user' ? 'px-2 self-end w-fit max-w-full' : ''}
|
||||
${role === 'assistant' ? 'self-start w-full max-w-full' : ''}
|
||||
`}
|
||||
>
|
||||
<div
|
||||
// style chatbubble according to role
|
||||
className={`
|
||||
p-2 text-left space-y-2 rounded-lg break-all
|
||||
p-2 text-left space-y-2 rounded-lg
|
||||
overflow-x-auto max-w-full
|
||||
${role === 'user' ? 'bg-vscode-input-bg text-vscode-input-fg' : ''}
|
||||
`}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ import { IKeybindingService } from '../../../../../../../platform/keybinding/com
|
|||
import { IEnvironmentService } from '../../../../../../../platform/environment/common/environment.js'
|
||||
import { IConfigurationService } from '../../../../../../../platform/configuration/common/configuration.js'
|
||||
import { IPathService } from '../../../../../../../workbench/services/path/common/pathService.js'
|
||||
import { IMetricsService } from '../../../../../../../platform/void/common/metricsService.js'
|
||||
|
||||
|
||||
// normally to do this you'd use a useEffect that calls .onDidChangeState(), but useEffect mounts too late and misses initial state changes
|
||||
|
|
@ -181,6 +182,7 @@ const getReactAccessor = (accessor: ServicesAccessor) => {
|
|||
IEnvironmentService: accessor.get(IEnvironmentService),
|
||||
IConfigurationService: accessor.get(IConfigurationService),
|
||||
IPathService: accessor.get(IPathService),
|
||||
IMetricsService: accessor.get(IMetricsService),
|
||||
|
||||
} as const
|
||||
return reactAccessor
|
||||
|
|
|
|||
|
|
@ -60,6 +60,10 @@ export type ChatThreads = {
|
|||
createdAt: string; // ISO string
|
||||
lastModified: string; // ISO string
|
||||
messages: ChatMessage[];
|
||||
|
||||
// editing state
|
||||
isBeingEdited: boolean;
|
||||
_currentStagingSelections: CodeStagingSelection[] | null;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -77,6 +81,8 @@ const newThreadObject = () => {
|
|||
createdAt: now,
|
||||
lastModified: now,
|
||||
messages: [],
|
||||
isBeingEdited: false,
|
||||
_currentStagingSelections: null,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue