diff --git a/web/src/lib/components/ContextRail.svelte b/web/src/lib/components/ContextRail.svelte deleted file mode 100644 index cc06bcf..0000000 --- a/web/src/lib/components/ContextRail.svelte +++ /dev/null @@ -1,109 +0,0 @@ - - - diff --git a/web/src/lib/components/SessionGraph.svelte b/web/src/lib/components/SessionGraph.svelte new file mode 100644 index 0000000..adfde18 --- /dev/null +++ b/web/src/lib/components/SessionGraph.svelte @@ -0,0 +1,441 @@ + + + + + diff --git a/web/src/lib/components/ToolCallGroup.svelte b/web/src/lib/components/ToolCallGroup.svelte new file mode 100644 index 0000000..0fb42d5 --- /dev/null +++ b/web/src/lib/components/ToolCallGroup.svelte @@ -0,0 +1,79 @@ + + +{#if tools.length} +
+ + {#if inProgress} + + {:else if hasError} + + {:else} + + {/if} + {tools.length} tool{tools.length === 1 ? '' : 's'} + {names} + + +
+ {#each tools as tool (tool.id)} +
+
+ {#if tool.type === 'tool_result' && tool.error} + + {:else if tool.type === 'tool_result'} + + {:else} + + {/if} + {tool.name} + {toolSummary(tool.args)} +
+
+ {#if tool.args} +
{JSON.stringify(tool.args, null, 2)}
+ {/if} + {#if tool.type === 'tool_result'} +
{tool.error ?? JSON.stringify(tool.result, null, 2)}
+ {/if} +
+
+ {/each} +
+
+{/if} diff --git a/web/src/pages/Chat.svelte b/web/src/pages/Chat.svelte index eda5a3a..a3ddbca 100644 --- a/web/src/pages/Chat.svelte +++ b/web/src/pages/Chat.svelte @@ -1,14 +1,12 @@
@@ -87,35 +106,13 @@
{/if} - {#each $messages as msg (msg.id)} + {#each $messages as msg, i (msg.id)}
{#if msg.role === 'user'}
{msg.text}
{:else}
- {#each msg.tools as tool (tool.id)} -
- - {#if tool.type === 'tool_result' && tool.error} - - {:else if tool.type === 'tool_result'} - - {:else} - - {/if} - {tool.name} - {toolSummary(tool.args)} - -
- {#if tool.args} -
{JSON.stringify(tool.args, null, 2)}
- {/if} - {#if tool.type === 'tool_result'} -
{tool.error ?? JSON.stringify(tool.result, null, 2)}
- {/if} -
-
- {/each} + {#if msg.text}
@@ -174,8 +171,22 @@
{#if showRail} -