mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 04:44:21 +01:00
Add @ mention support for agents and files, extract CopyButton component
This commit is contained in:
1 parent
3e31dbcdf8
commit
dc7964021d
11 files changed
+306
-99
No files matched your search
@@ -16,6 +16,7 @@ interface MessageThreadProps {
|
||||
directory?: string
|
||||
messages?: MessageWithParts[]
|
||||
onFileClick?: (filePath: string, lineNumber?: number) => void
|
||||
onChildSessionClick?: (sessionId: string) => void
|
||||
}
|
||||
|
||||
const isMessageStreaming = (msg: MessageWithParts): boolean => {
|
||||
@@ -28,7 +29,7 @@ const isMessageThinking = (msg: MessageWithParts): boolean => {
|
||||
return msg.parts.length === 0 && isMessageStreaming(msg)
|
||||
}
|
||||
|
||||
export const MessageThread = memo(function MessageThread({ messages, onFileClick }: MessageThreadProps) {
|
||||
export const MessageThread = memo(function MessageThread({ messages, onFileClick, onChildSessionClick }: MessageThreadProps) {
|
||||
if (!messages || messages.length === 0) {
|
||||
return (
|
||||
<div className="flex items-center justify-center h-full text-muted-foreground">
|
||||
@@ -86,6 +87,7 @@ export const MessageThread = memo(function MessageThread({ messages, onFileClick
|
||||
allParts={msg.parts}
|
||||
partIndex={index}
|
||||
onFileClick={onFileClick}
|
||||
onChildSessionClick={onChildSessionClick}
|
||||
messageTextContent={msg.info.role === 'assistant' ? getMessageTextContent(msg) : undefined}
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user