mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 04:44:21 +01:00
feat(artifacts): render agent HTML files inline in the session chat
This commit is contained in:
1 parent
377e3c2784
commit
f7b2ffb865
17 files changed
+579
-10
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import { memo } from 'react'
|
||||
import type { SessionMessageAssistant } from '@opencode-manager/shared/opencode'
|
||||
import { readShowArtifactCall, type SessionMessageAssistant } from '@opencode-manager/shared/opencode'
|
||||
import { TextPart } from './TextPart'
|
||||
import { ToolCallPart } from './ToolCallPart'
|
||||
import { useSettings } from '@/hooks/useSettings'
|
||||
@@ -40,7 +40,7 @@ export const MessagePart = memo(function MessagePart({ part, messageID, director
|
||||
</details>
|
||||
)
|
||||
case 'tool':
|
||||
if (simpleChatMode && part.name !== 'subagent') return null
|
||||
if (simpleChatMode && part.name !== 'subagent' && !readShowArtifactCall(part)) return null
|
||||
return (
|
||||
<ToolCallPart
|
||||
part={part}
|
||||
|
||||
Reference in new issue
Block a user