diff --git a/frontend/src/components/transcript-debug/AssistantMessageBubble.vue b/frontend/src/components/transcript-debug/AssistantMessageBubble.vue index c71d2d3..674372f 100644 --- a/frontend/src/components/transcript-debug/AssistantMessageBubble.vue +++ b/frontend/src/components/transcript-debug/AssistantMessageBubble.vue @@ -3,6 +3,19 @@ import { computed } from 'vue' import type { ParsedAssistantMessage } from '@/types/transcript-debug' import ThinkingBlock from './ThinkingBlock.vue' import ToolCallBlock from './ToolCallBlock.vue' +import MarkdownContent from './MarkdownContent.vue' +import AskUserQuestionCard from './toolCards/AskUserQuestionCard.vue' +import ExitPlanModeCard from './toolCards/ExitPlanModeCard.vue' +import EnterPlanModeCard from './toolCards/EnterPlanModeCard.vue' +import ReadCard from './toolCards/ReadCard.vue' +import WriteCard from './toolCards/WriteCard.vue' +import BashCard from './toolCards/BashCard.vue' +import EditCard from './toolCards/EditCard.vue' +import GrepCard from './toolCards/GrepCard.vue' +import GlobCard from './toolCards/GlobCard.vue' +import TaskCard from './toolCards/TaskCard.vue' + +const TASK_TOOLS = new Set(['Task', 'TaskCreate', 'TaskUpdate', 'TaskGet', 'TaskList']) const props = defineProps<{ message: ParsedAssistantMessage @@ -62,24 +75,36 @@ function formatTokens(n?: number): string { :content="t" /> - -
{{ JSON.stringify(call.input, null, 2) }}
+
diff --git a/frontend/src/components/transcript-debug/ToolResultBlock.vue b/frontend/src/components/transcript-debug/ToolResultBlock.vue
index f1b3ffa..7aa51d8 100644
--- a/frontend/src/components/transcript-debug/ToolResultBlock.vue
+++ b/frontend/src/components/transcript-debug/ToolResultBlock.vue
@@ -1,12 +1,29 @@
@@ -25,7 +42,7 @@ const expanded = ref(false)
Result
{{ result.content.length }} chars
- {{ result.content }}
+
diff --git a/frontend/src/components/transcript-debug/UserMessageBubble.vue b/frontend/src/components/transcript-debug/UserMessageBubble.vue
index 96d2d7d..e2bd138 100644
--- a/frontend/src/components/transcript-debug/UserMessageBubble.vue
+++ b/frontend/src/components/transcript-debug/UserMessageBubble.vue
@@ -33,8 +33,10 @@ function formatTime(ts: string): string {
diff --git a/frontend/src/components/transcript-debug/toolCards/BashCard.vue b/frontend/src/components/transcript-debug/toolCards/BashCard.vue
new file mode 100644
index 0000000..d8f235d
--- /dev/null
+++ b/frontend/src/components/transcript-debug/toolCards/BashCard.vue
@@ -0,0 +1,164 @@
+
+
+
+ {{ p.tool }}
+ {{ p.prompt }}
+ {{ pattern }}
+ /{{ pattern }}/{{ caseInsensitive ? 'i' : '' }}{{ multiline ? 'm' : '' }}
+ {{ description }}
+ {{ prompt }}
+ ${highlighted}${parseMarkdown(quoteLines.join('\n'))}`) + continue + } + + // Unordered list + if (/^\s*[-*+]\s+/.test(line)) { + const items: string[] = [] + while (i < lines.length && /^\s*[-*+]\s+/.test(lines[i])) { + items.push(lines[i].replace(/^\s*[-*+]\s+/, '')) + i++ + } + out.push(`
${inlineParse(esc(paraLines.join('\n')))}
`) + } + } + + return out.join('\n') +} + +/** Parse inline markdown elements (bold, italic, code, links, images). */ +function inlineParse(html: string): string { + return html + // Images  + .replace(/!\[([^\]]*)\]\(([^)]+)\)/g, '$1')
+ // Line breaks
+ .replace(/\n/g, '