refactor(chat): streamline AssistantMessage and ToolInvocations components

- Moved the Markdown rendering for content in AssistantMessage to a new position for better structure.
- Updated ToolInvocations component to enhance UI with improved spacing and keyboard shortcut handling for tool execution.
- Added state management for expanded tool details and integrated keyboard shortcuts for approving and rejecting tool calls.
This commit is contained in:
KevIsDev
2025-07-12 10:40:49 +01:00
parent 2b40b8af52
commit c93f6d0d0a
2 changed files with 134 additions and 54 deletions

View File

@@ -176,6 +176,9 @@ export const AssistantMessage = memo(
</div>
</div>
</>
<Markdown append={append} chatMode={chatMode} setChatMode={setChatMode} model={model} provider={provider} html>
{content}
</Markdown>
{toolInvocations && toolInvocations.length > 0 && (
<ToolInvocations
toolInvocations={toolInvocations}
@@ -183,9 +186,6 @@ export const AssistantMessage = memo(
addToolResult={addToolResult}
/>
)}
<Markdown append={append} chatMode={chatMode} setChatMode={setChatMode} model={model} provider={provider} html>
{content}
</Markdown>
</div>
);
},