+
+ {String(toolName)}
+
+ {providerExecuted ? (
+ provider
+ ) : null}
+
+
+ {state === 'input-streaming' ? (
+ <>
+ {'input' in part && part.input !== undefined ? (
+
+ ) : null}
+ >
+ ) : null}
+
+ {state === 'input-available' ? (
+ <>
+
+ {callProviderMetadata ? (
+
+ ) : null}
+ >
+ ) : null}
+
+ {state === 'output-available' ? (
+ <>
+
+
+ {preliminary ?
Preliminary result
: null}
+ {callProviderMetadata ? (
+
+ ) : null}
+ >
+ ) : null}
+
+ {state === 'output-error' ? (
+ <>
+
+ {errorText || 'Tool execution error'}
+
+ {'rawInput' in part && (part as any).rawInput !== undefined ? (
+
+ ) : 'input' in part && (part as any).input !== undefined ? (
+
+ ) : null}
+ {callProviderMetadata ? (
+
+ ) : null}
+ >
+ ) : null}
+
+ )
+}
+
+export default ToolInvocation
diff --git a/src/ui/AgentSidebar/agent-sidebar.module.css b/src/ui/AgentSidebar/agent-sidebar.module.css
new file mode 100644
index 0000000..833a3c9
--- /dev/null
+++ b/src/ui/AgentSidebar/agent-sidebar.module.css
@@ -0,0 +1,305 @@
+:root {
+ --agent-nav-width: 96px;
+ --agent-panel-width: 340px;
+}
+
+.panel {
+ position: fixed;
+ top: 0;
+ right: 0;
+ height: 100vh;
+ width: var(--agent-panel-width);
+ background: var(--theme-elevation-0);
+ box-shadow: 0 0 0 1px var(--theme-elevation-150), 0 8px 24px rgba(0, 0, 0, 0.08);
+ transform: translateX(100%);
+ transition: transform 200ms ease;
+ z-index: 30;
+ display: flex;
+ flex-direction: column;
+}
+
+.open {
+ transform: translateX(0);
+}
+
+.header {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 8px;
+ height: var(--doc-controls-height);
+ box-shadow: 1px 1px var(--theme-elevation-150);
+ padding: 12px;
+ z-index: 1;
+}
+
+.title {
+ display: inline-flex;
+ align-items: center;
+ gap: 8px;
+ font-weight: 600;
+ color: var(--theme-elevation-800);
+}
+
+.badge {
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 11px;
+ padding: 2px 6px;
+ border-radius: 6px;
+ background: var(--theme-elevation-100);
+ color: var(--theme-elevation-800);
+ border: 1px solid var(--theme-elevation-150);
+}
+
+.body {
+ flex: 1;
+ overflow: auto;
+ padding: 12px;
+}
+
+.placeholder {
+ border: 1px dashed var(--theme-elevation-200);
+ background: var(--theme-elevation-50);
+ padding: 12px;
+ border-radius: 8px;
+ color: var(--theme-elevation-700);
+}
+
+.placeholderTitle {
+ margin: 0 0 6px 0;
+ font-weight: 600;
+ color: var(--theme-elevation-800);
+}
+
+.placeholderText {
+ margin: 0;
+ font-size: 12px;
+ color: var(--theme-elevation-700);
+}
+
+.footer {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ border-top: 1px solid var(--theme-elevation-150);
+}
+
+.input {
+ flex: 1;
+ height: 48px;
+ /*border-radius: 8px;*/
+ border: 0;
+ padding: 8px 12px;
+ background: var(--theme-elevation-0);
+ color: var(--theme-elevation-800);
+ outline: none;
+}
+
+.send {
+ height: 32px;
+ padding: 0 12px;
+ border: 0;
+ background: var(--theme-elevation-0);
+ color: var(--theme-elevation-800);
+}
+
+.launcher {
+ padding: 8px 5px 5px 5px;
+ width: 36px;
+ height: 36px;
+ border-radius: 50%;
+
+ display: flex;
+ align-items: center;
+ justify-content: center;
+
+ position: fixed;
+ right: 12px;
+ bottom: 42px;
+ z-index: 31;
+ gap: 8px;
+ background: var(--color-base-1000);
+ color: var(--theme-elevation-800);
+ border: 1px solid var(--theme-elevation-100);
+ box-shadow: 0 2px 10px rgba(0,0,0,0.06);
+ cursor: pointer;
+ transition: right 200ms ease;
+}
+
+.launcherActive {
+ right: calc(var(--agent-panel-width) + 12px)
+}
+
+.launcher:hover {
+ background: var(--theme-elevation-50);
+}
+
+/* ========== New styles for message/parts/tool rendering ========== */
+
+.message {
+ border: 1px solid var(--theme-elevation-100);
+ background: var(--theme-elevation-0);
+ border-radius: 8px;
+ padding: 8px;
+ margin: 8px 0;
+}
+
+.role {
+ font-weight: 600;
+ color: var(--theme-elevation-800);
+ margin-bottom: 4px;
+}
+
+.parts {
+ display: flex;
+ flex-direction: column;
+ gap: 6px;
+}
+
+.part {
+ font-size: 13px;
+ color: var(--theme-elevation-800);
+}
+
+.partText {
+ /* reserved for text-specific styles */
+}
+
+.reasoning {
+ color: var(--theme-elevation-600);
+ font-style: italic;
+}
+
+.file {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+}
+
+.fileImage {
+ max-width: 100%;
+ height: auto;
+ border-radius: 6px;
+ border: 1px solid var(--theme-elevation-100);
+}
+
+.fileLink {
+ color: var(--theme-elevation-800);
+ text-decoration: underline;
+}
+
+.source {
+ font-size: 12px;
+ color: var(--theme-elevation-700);
+}
+
+.sourceTitle {
+ font-weight: 600;
+}
+
+.muted {
+ color: var(--theme-elevation-600);
+}
+
+.divider {
+ height: 1px;
+ background: var(--theme-elevation-150);
+ margin: 6px 0;
+}
+
+.tool {
+ border: 1px solid var(--theme-elevation-100);
+ background: var(--theme-elevation-50);
+ border-radius: 6px;
+ padding: 8px;
+}
+
+.toolHeader {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ margin-bottom: 6px;
+}
+
+.toolName {
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
+ font-size: 12px;
+ background: var(--theme-elevation-0);
+ border: 1px solid var(--theme-elevation-150);
+ border-radius: 4px;
+ padding: 2px 6px;
+}
+
+.badgeSmall {
+ font-size: 10px;
+ padding: 1px 5px;
+}
+
+.badgeStreaming {
+ background: var(--theme-elevation-50);
+ border-color: var(--theme-elevation-150);
+}
+
+.badgeAvailable {
+ background: var(--theme-elevation-100);
+ border-color: var(--theme-elevation-200);
+}
+
+.badgeError {
+ background: #fee;
+ border-color: #fcc;
+ color: #b00;
+}
+
+.note {
+ font-size: 12px;
+ color: var(--theme-elevation-700);
+}
+
+.errorText {
+ color: #b00;
+}
+
+.json {
+ /* container for JSON details */
+}
+
+.jsonDetails {
+ border: 1px solid var(--theme-elevation-100);
+ border-radius: 6px;
+ background: var(--theme-elevation-0);
+}
+
+.jsonSummary {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 6px 8px;
+ cursor: pointer;
+}
+
+.jsonLabel {
+ font-weight: 600;
+ color: var(--theme-elevation-800);
+ font-size: 12px;
+}
+
+.copyButton {
+ font-size: 11px;
+ border: 1px solid var(--theme-elevation-150);
+ background: var(--theme-elevation-0);
+ color: var(--theme-elevation-800);
+ border-radius: 6px;
+ padding: 2px 6px;
+}
+
+.code {
+ margin: 0;
+ padding: 8px;
+ overflow: auto;
+ font-size: 12px;
+ line-height: 1.4;
+ color: var(--theme-elevation-800);
+}
diff --git a/src/ui/AgentSidebar/body.css b/src/ui/AgentSidebar/body.css
new file mode 100644
index 0000000..ecd3198
--- /dev/null
+++ b/src/ui/AgentSidebar/body.css
@@ -0,0 +1,6 @@
+:root { --agent-sider-w: 340px; }
+
+.agent-sider-open {
+ padding-right: var(--agent-sider-w);
+ transition: padding-right 200ms ease;
+}
\ No newline at end of file
diff --git a/src/ui/Icons/Icons.tsx b/src/ui/Icons/Icons.tsx
index 33156fe..67db01d 100644
--- a/src/ui/Icons/Icons.tsx
+++ b/src/ui/Icons/Icons.tsx
@@ -5,13 +5,15 @@ import LottieAnimation from './LottieAnimation.js'
export const PluginIcon = ({
color = 'white',
+ hasDivider = true,
isLoading,
}: {
color?: string
+ hasDivider?: boolean
isLoading?: boolean
}) => {
return (
-