Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
bd9839d
webui: MCP client with low coupling to current codebase
ServeurpersoCom Nov 17, 2025
f715fe3
webui: use normalizedMessages after upstream refactor
ServeurpersoCom Dec 6, 2025
ad7d9ed
feat: Introduce common utility functions
allozaur Dec 29, 2025
f64dc6e
feat: Centralize MCP and Agentic type definitions and constants
allozaur Dec 29, 2025
2b1d783
refactor: Update Agentic and MCP config parsing to use new utils and …
allozaur Dec 29, 2025
609723f
feat: Add @modelcontextprotocol/sdk and zod dependencies
allozaur Dec 29, 2025
a0a2f09
feat: Refactor MCP client to use official SDK
allozaur Dec 29, 2025
5b124ef
feat: Introduce reactive mcpStore for client lifecycle management
allozaur Dec 29, 2025
5eeb381
feat: Implement agentic orchestration within ChatService
allozaur Dec 29, 2025
783f170
refactor: Update ChatStore to leverage mcpStore for agentic flow
allozaur Dec 29, 2025
238f758
feat: Add AgenticContent component for enhanced tool call rendering
allozaur Dec 29, 2025
619a906
docs: Update high-level architecture diagrams for MCP integration
allozaur Dec 29, 2025
1165554
refactor: Tool call handling
allozaur Dec 30, 2025
faeefc6
feat: Raw LLM output switch per message
allozaur Dec 31, 2025
bf679e0
refactor: Consolidate UI CSS classes into shared module
allozaur Jan 2, 2026
142aa54
feat: Add McpLogo Svelte component
allozaur Jan 2, 2026
3bd7b90
feat: Enhance server config with headers and schema normalization
allozaur Jan 2, 2026
945a429
refactor: Centralize health check logic in store
allozaur Jan 2, 2026
b19cd24
feat: Implement dedicated server management UI components
allozaur Jan 2, 2026
761efb2
feat: Integrate server management dialog into chat settings
allozaur Jan 2, 2026
40ddb83
feat: Display and manage servers in ChatForm actions
allozaur Jan 2, 2026
3745efa
feat: Enhance tool call streaming UI and output format
allozaur Jan 2, 2026
b4a407e
feat: Implement lazy MCP client shutdown
allozaur Jan 2, 2026
2e2400f
feat: Add image load error fallback in MarkdownContent
allozaur Jan 2, 2026
3aa8b37
feat: Add per-chat MCP server overrides
allozaur Jan 3, 2026
7635da1
feat: Enhance MCP server dropdown with search, popularity sorting, an…
allozaur Jan 3, 2026
51feac0
feat: Improve agentic tool call streaming display with 'in progress' …
allozaur Jan 3, 2026
a084a0f
webui: remove unused imports
ServeurpersoCom Jan 3, 2026
602cf53
webui: remove legacy wrapper and restore WebSocket transport
ServeurpersoCom Jan 3, 2026
8648cd1
chore: update webui build output
ServeurpersoCom Jan 3, 2026
74bccba
webui: split raw output into backend parsing and frontend display opt…
ServeurpersoCom Jan 3, 2026
ac4f61f
chore: update webui build output
ServeurpersoCom Jan 3, 2026
be4bb5e
webui: raw tool result display, strip only leading/trailing newlines …
ServeurpersoCom Jan 4, 2026
82caee7
chore: update webui build output
ServeurpersoCom Jan 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified tools/server/public/index.html.gz
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ flowchart TB
C_Form["ChatForm"]
C_Messages["ChatMessages"]
C_Message["ChatMessage"]
C_AgenticContent["AgenticContent"]
C_MessageEditForm["ChatMessageEditForm"]
C_ModelsSelector["ModelsSelector"]
C_Settings["ChatSettings"]
C_McpSettings["McpSettingsSection"]
end

subgraph Hooks["🪝 Hooks"]
Expand All @@ -27,20 +29,26 @@ flowchart TB
S2["conversationsStore<br/><i>Conversation data & messages</i>"]
S3["modelsStore<br/><i>Model selection & loading</i>"]
S4["serverStore<br/><i>Server props & role detection</i>"]
S5["settingsStore<br/><i>User configuration</i>"]
S5["settingsStore<br/><i>User configuration incl. MCP</i>"]
end

subgraph Services["⚙️ Services"]
SV1["ChatService"]
SV1["ChatService<br/><i>incl. agentic loop</i>"]
SV2["ModelsService"]
SV3["PropsService"]
SV4["DatabaseService"]
SV5["ParameterSyncService"]
end

subgraph MCP["🔧 MCP (Model Context Protocol)"]
MCP1["MCPClient<br/><i>@modelcontextprotocol/sdk</i>"]
MCP2["mcpStore<br/><i>reactive state</i>"]
MCP3["OpenAISseClient"]
end

subgraph Storage["💾 Storage"]
ST1["IndexedDB<br/><i>conversations, messages</i>"]
ST2["LocalStorage<br/><i>config, userOverrides</i>"]
ST2["LocalStorage<br/><i>config, userOverrides, mcpServers</i>"]
end

subgraph APIs["🌐 llama-server API"]
Expand All @@ -50,15 +58,22 @@ flowchart TB
API4["/v1/models"]
end

subgraph ExternalMCP["🔌 External MCP Servers"]
EXT1["MCP Server 1"]
EXT2["MCP Server N"]
end

%% Routes → Components
R1 & R2 --> C_Screen
RL --> C_Sidebar

%% Component hierarchy
C_Screen --> C_Form & C_Messages & C_Settings
C_Messages --> C_Message
C_Message --> C_AgenticContent
C_Message --> C_MessageEditForm
C_Form & C_MessageEditForm --> C_ModelsSelector
C_Settings --> C_McpSettings

%% Components → Hooks → Stores
C_Form & C_Messages --> H1 & H2
Expand All @@ -70,6 +85,7 @@ flowchart TB
C_Sidebar --> S2
C_ModelsSelector --> S3 & S4
C_Settings --> S5
C_McpSettings --> S5

%% Stores → Services
S1 --> SV1 & SV4
Expand All @@ -78,6 +94,12 @@ flowchart TB
S4 --> SV3
S5 --> SV5

%% ChatService → MCP (Agentic Mode)
SV1 --> MCP2
MCP2 --> MCP1
SV1 --> MCP3
MCP3 --> API1

%% Services → Storage
SV4 --> ST1
SV5 --> ST2
Expand All @@ -87,6 +109,9 @@ flowchart TB
SV2 --> API3 & API4
SV3 --> API2

%% MCP → External Servers
MCP1 --> EXT1 & EXT2

%% Styling
classDef routeStyle fill:#e1f5fe,stroke:#01579b,stroke-width:2px
classDef componentStyle fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
Expand All @@ -95,12 +120,16 @@ flowchart TB
classDef serviceStyle fill:#e8f5e9,stroke:#2e7d32,stroke-width:2px
classDef storageStyle fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef apiStyle fill:#e3f2fd,stroke:#1565c0,stroke-width:2px
classDef mcpStyle fill:#e0f2f1,stroke:#00695c,stroke-width:2px
classDef externalStyle fill:#f3e5f5,stroke:#6a1b9a,stroke-width:2px,stroke-dasharray: 5 5

class R1,R2,RL routeStyle
class C_Sidebar,C_Screen,C_Form,C_Messages,C_Message,C_MessageEditForm,C_ModelsSelector,C_Settings componentStyle
class C_Sidebar,C_Screen,C_Form,C_Messages,C_Message,C_AgenticContent,C_MessageEditForm,C_ModelsSelector,C_Settings,C_McpSettings componentStyle
class H1,H2 hookStyle
class S1,S2,S3,S4,S5 storeStyle
class SV1,SV2,SV3,SV4,SV5 serviceStyle
class ST1,ST2 storageStyle
class API1,API2,API3,API4 apiStyle
class MCP1,MCP2,MCP3 mcpStyle
class EXT1,EXT2 externalStyle
```
42 changes: 42 additions & 0 deletions tools/server/webui/docs/architecture/high-level-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,32 @@ end
end
end

subgraph MCP["🔧 MCP (Model Context Protocol)"]
direction TB
subgraph MCPStoreBox["mcpStore"]
MCPStoreState["<b>State:</b><br/>client, isInitializing<br/>error, availableTools"]
MCPStoreLifecycle["<b>Lifecycle:</b><br/>ensureClient()<br/>shutdown()"]
MCPStoreExec["<b>Execution:</b><br/>execute()"]
end
subgraph MCPClient["MCPClient"]
MCP1Init["<b>Lifecycle:</b><br/>initialize()<br/>shutdown()"]
MCP1Tools["<b>Tools:</b><br/>listTools()<br/>getToolsDefinition()<br/>execute()"]
MCP1Transport["<b>Transport:</b><br/>StreamableHTTPClientTransport<br/>SSEClientTransport (fallback)"]
end
subgraph MCPSse["OpenAISseClient"]
MCP3Stream["<b>Streaming:</b><br/>streamChatCompletion()"]
MCP3Parse["<b>Parsing:</b><br/>tool call delta merging"]
end
subgraph MCPConfig["config/mcp"]
MCP4Parse["<b>Parsing:</b><br/>parseServersFromSettings()"]
end
end

subgraph ExternalMCP["🔌 External MCP Servers"]
EXT1["MCP Server 1<br/>(StreamableHTTP/SSE)"]
EXT2["MCP Server N"]
end

subgraph Storage["💾 Storage"]
ST1["IndexedDB"]
ST2["conversations"]
Expand Down Expand Up @@ -240,6 +266,16 @@ end
SV2 --> API3 & API4
SV3 --> API2

%% ChatService → MCP (Agentic Mode)
SV1 --> MCPStoreBox
MCPStoreBox --> MCPClient
SV1 --> MCPSse
MCPSse --> API1
MCPConfig --> MCPStoreBox

%% MCP → External Servers
MCPClient --> EXT1 & EXT2

%% Styling
classDef routeStyle fill:#e1f5fe,stroke:#01579b,stroke-width:2px
classDef componentStyle fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
Expand All @@ -250,6 +286,9 @@ end
classDef reactiveStyle fill:#fffde7,stroke:#f9a825,stroke-width:1px
classDef serviceStyle fill:#e8f5e9,stroke:#2e7d32,stroke-width:2px
classDef serviceMStyle fill:#c8e6c9,stroke:#2e7d32,stroke-width:1px
classDef mcpStyle fill:#e0f2f1,stroke:#00695c,stroke-width:2px
classDef mcpMethodStyle fill:#b2dfdb,stroke:#00695c,stroke-width:1px
classDef externalStyle fill:#f3e5f5,stroke:#6a1b9a,stroke-width:2px,stroke-dasharray: 5 5
classDef storageStyle fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef apiStyle fill:#e3f2fd,stroke:#1565c0,stroke-width:2px

Expand All @@ -269,6 +308,9 @@ end
class S5Lifecycle,S5Update,S5Reset,S5Sync,S5Utils methodStyle
class ChatExports,ConvExports,ModelsExports,ServerExports,SettingsExports reactiveStyle
class SV1,SV2,SV3,SV4,SV5 serviceStyle
class MCPStoreBox,MCPClient,MCPSse,MCPConfig mcpStyle
class MCPStoreState,MCPStoreLifecycle,MCPStoreExec,MCP1Init,MCP1Tools,MCP1Transport,MCP3Stream,MCP3Parse,MCP4Build,MCP4Parse mcpMethodStyle
class EXT1,EXT2 externalStyle
class SV1Msg,SV1Stream,SV1Convert,SV1Utils serviceMStyle
class SV2List,SV2LoadUnload,SV2Status serviceMStyle
class SV3Fetch serviceMStyle
Expand Down
2 changes: 1 addition & 1 deletion tools/server/webui/docs/flows/settings-flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,6 @@ sequenceDiagram

Note over settingsStore: UI-only (not synced):
rect rgb(255, 240, 240)
Note over settingsStore: systemMessage, custom (JSON)<br/>showStatistics, enableContinueGeneration<br/>autoMicOnEmpty, disableAutoScroll<br/>apiKey, pdfAsImage, disableReasoningFormat
Note over settingsStore: systemMessage, custom (JSON)<br/>showStatistics, enableContinueGeneration<br/>autoMicOnEmpty, disableAutoScroll<br/>apiKey, pdfAsImage, disableReasoningParsing, showRawOutputSwitch
end
```
Loading
Loading