diff --git a/src/renderer/components/chat/items/linkedTool/EditToolViewer.tsx b/src/renderer/components/chat/items/linkedTool/EditToolViewer.tsx index b924a9be..b8a8ef7d 100644 --- a/src/renderer/components/chat/items/linkedTool/EditToolViewer.tsx +++ b/src/renderer/components/chat/items/linkedTool/EditToolViewer.tsx @@ -36,6 +36,7 @@ export const EditToolViewer: React.FC = ({ linkedTool, stat oldString={oldString} newString={newString} tokenCount={linkedTool.callTokens} + syntaxHighlight /> {/* Show result status if available */} diff --git a/src/renderer/components/chat/items/linkedTool/renderHelpers.tsx b/src/renderer/components/chat/items/linkedTool/renderHelpers.tsx index 6463f947..c2815a01 100644 --- a/src/renderer/components/chat/items/linkedTool/renderHelpers.tsx +++ b/src/renderer/components/chat/items/linkedTool/renderHelpers.tsx @@ -12,6 +12,7 @@ import { DIFF_ADDED_TEXT, DIFF_REMOVED_TEXT, } from '@renderer/constants/cssVariables'; +import { highlightLines } from '@renderer/utils/syntaxHighlighter'; /** * Renders the input section based on tool type with theme-aware styling. @@ -58,6 +59,7 @@ export function renderInput(toolName: string, input: Record): R if (toolName === 'Bash') { const command = input.command as string | undefined; const description = input.description as string | undefined; + const highlighted = command ? highlightLines(command, 'command.sh') : null; return (
@@ -66,11 +68,13 @@ export function renderInput(toolName: string, input: Record): R {description}
)} - {command && ( - - {command} + {highlighted ? ( + + {highlighted.map((html, i) => ( +
+ ))} - )} + ) : null}
); } diff --git a/src/renderer/components/extensions/skills/SkillReviewDialog.tsx b/src/renderer/components/extensions/skills/SkillReviewDialog.tsx index 9a1ac516..9120bbfb 100644 --- a/src/renderer/components/extensions/skills/SkillReviewDialog.tsx +++ b/src/renderer/components/extensions/skills/SkillReviewDialog.tsx @@ -126,6 +126,7 @@ export const SkillReviewDialog = ({ oldString={change.oldContent ?? ''} newString={change.newContent ?? ''} maxHeight="max-h-80" + syntaxHighlight /> )}