-
Notifications
You must be signed in to change notification settings - Fork 16.8k
webui: Agentic Loop + MCP Client with support for Tools, Resources and Prompts #18655
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
374 commits
Select commit
Hold shift + click to select a range
9b6a926
feat: MCP Prompts implementation improvements
allozaur 52e3aad
chore: update webui build output
allozaur bfd742a
refactor: Cleanup
allozaur 6825a66
refactor: Constants
allozaur 9159236
chore: update webui build output
allozaur c2fe44f
refactor: Cleanup
allozaur 721aea6
chore: update webui build output
allozaur 9f5910b
refactor: Remove unused code
allozaur b79d4b1
refactor: Naming + remove redundant component
allozaur 8af2b4c
refactor: Cleanup
allozaur 0e7dee7
chore: update webui build output
allozaur 3461c41
refactor: Naming & Enums
allozaur c577c8f
refactor: Cleanup
allozaur 92c5bc1
chore: update webui build output
allozaur c44f7b1
chore: Add deprecation comment
allozaur c4e78be
refactor: DRY
allozaur 087c707
chore: update webui build output
allozaur 197413a
refactor: Types
allozaur 3f06755
chore: update webui build output
allozaur fe2ae33
refactor: Simplify MCP errors
allozaur 938d5b2
chore: update webui build output
allozaur b0f7c48
refactor: Cleanup
allozaur 5ac34df
refactor: Enums
allozaur 7ef2f8c
chore: update webui build output
allozaur 8bbe04f
refactor: Use store methods
allozaur 9a6268e
refactor: Utility function
allozaur 5befd79
refactor: Componentize Chat Form Prompt Picker
allozaur 6cd4eb1
chore: update webui build output
allozaur 639b4e2
refactor: Cleanup
allozaur 6065487
refactor: Components imports/exports structure & documentation
allozaur 473257a
chore: update webui build output
allozaur 60a0f5f
feat: Improve Code blocks rendering + add auto scroll + improve globa…
allozaur 86172df
chore: update webui build output
allozaur b6a22a9
fix: Scroll issues in DropdownMenuSearchable
allozaur 5d8db08
feat: Mcp Server Selector
allozaur 9684892
chore: update webui build output
allozaur 9f1fe84
refactor: Cleanup
allozaur 3b76ee5
refactor: Cleanup
allozaur 275d3e8
fix: Wait for all MCP Servers Health Checks to load
allozaur 2c20e68
chore: update webui build output
allozaur ee9369f
refactor: Utils
allozaur a1ec801
refactor: Components
allozaur 156ce33
chore: update webui build output
allozaur c3cf314
webui: remove unused sessionId, SDK handles it automatically
ServeurpersoCom 934f6eb
webui: remove unused sessionId, SDK handles it automatically
ServeurpersoCom d379d45
chore: update webui build output
allozaur aff70c9
feat: UI improvements
allozaur 41f43e0
refactor: Use Popover for Chat Form Prompt Picker
allozaur 6fb4835
fix: Edit Mode with MCP Prompt in message
allozaur 3f9f654
feat: Introduce clipboard types for MCP prompt attachments
allozaur 8e9479e
feat: Implement clipboard serialization/deserialization for MCP prompts
allozaur 219fe6c
feat: Add support for pasting MCP prompt attachments in ChatForm
allozaur 26be624
refactor: Improve styling and overflow handling for ChatMessageMcpPro…
allozaur 92c96d7
refactor: Components
allozaur fa62cb3
chore: update webui build output
allozaur 2d9fe69
refactor: Centralize chat-wide actions in ChatMessages.svelte
allozaur c44251b
refactor: Encapsulate message editing state and actions in ChatMessag…
allozaur 0af26c9
refactor: Adapt message child components to MessageEditContext
allozaur 7c91326
chore: update webui build output
allozaur 97aba3d
feat: Implement generic TTL cache utility
allozaur 90e6b8b
refactor: Use TTL cache for model properties in ModelsStore
allozaur 835e767
feat: Implement inactive chat conversation state cleanup
allozaur 4e20503
refactor: Remove unused `getChatActionsContext` import
allozaur d8a6cc5
chore: update webui build output
allozaur bf920a0
feat: Add auto-resizing textarea to KeyValuePairs component
allozaur 26fbe7f
feat: Disable server card toggle when in error state
allozaur 9fdd47f
feat: Enhance ChatMessageMcpPromptContent display
allozaur 533c370
chore: update webui build output
allozaur db2b089
refactor: Create shared ActiveConversationStore to avoid circular dep…
allozaur 6dbffc5
chore: update webui build output
allozaur 6dd88eb
refactor: Improves abort signal handling
allozaur e60f195
fix: Missing tool call handling
allozaur 5e4bfcf
feat: Introduce centralized API fetch utilities
allozaur e466031
feat: Introduce BaseClient for common store integration
allozaur 91496a3
refactor: Go back to simpler Stores + Services architecture
allozaur 687fb70
fix: Sync streaming content to active messages
allozaur f6bafbb
chore: update webui build output
allozaur a681c28
refactor: Reuse MCP connections for health checks
allozaur eb1442d
refactor: Componentize HorizontalScrollCarousel
allozaur f16458f
feat: Introduce MCP Resource Types and Service Methods
allozaur 0cd4d23
refactor: Use constants
allozaur ff25e06
feat: MCP Resources Svelte Store
allozaur e62db44
feat: Integrate Resource Store into Main MCP Store
allozaur 16a1675
feat: MCP Resources UI
allozaur 6a910b9
feat: Integrate Resource Attachments into Chat Form UI
allozaur eb11ce7
feat: Chat logic improvements
allozaur 31ad533
refactor: Refine Chat Message Processing State Display
allozaur eeb0d9d
fix: Linter errors
allozaur 9963743
chore: update webui build output
allozaur 356231d
refactor: Cleanup
allozaur 25e5d99
fix: Checking for capabilities from store
allozaur 4e50365
chore: update webui build output
allozaur 155d486
demo cors proxy
ngxson 434f0dd
fix
ngxson 4728dfb
download: use httplib and boringssl by default
ngxson d71277f
https working
ngxson e704674
feat: Integrate with `llama-server` proxy + improve MCP Server Edit Form
allozaur 05a0aa8
chore: update webui build output
allozaur c3a98dc
refactor: Proxy utility
allozaur 02f31c9
refactor: Use CORS Proxy for favicons calls
allozaur 021cc96
chore: update webui build output
allozaur 621518a
webui: adaptive model selector dropdown width
ServeurpersoCom 4e5395b
chore: update webui build output
ServeurpersoCom d7489d1
fix: responsive MCP server cards for mobile viewports
ServeurpersoCom e8e2068
fix: responsive MCP server cards, prioritize server name over version
ServeurpersoCom 5c85d06
chore: update webui build output
ServeurpersoCom dc99d7e
fix: skip sending image attachments to non-vision backends
ServeurpersoCom 4e6d811
chore: update webui build output
ServeurpersoCom 691c372
fix: also skip image attachments in message history for non-vision ba…
ServeurpersoCom 995b5bc
chore: update webui build output
ServeurpersoCom e7da3a0
feat: render images below attachment markers in tool results
ServeurpersoCom 88ac7d6
feat: render images inline below attachment markers in tool results
ServeurpersoCom 0038213
chore: update webui build output
ServeurpersoCom beb6271
webui: incremental MDAST transform caching for streaming performance
ServeurpersoCom 117d42a
chore: update webui build output
ServeurpersoCom 01927dc
webui: fix UI freeze at high token rates with RAF yield
ServeurpersoCom 91cfa80
chore: update webui build output
ServeurpersoCom 001d222
webui: remove artificial cache limit, let GC handle cleanup on conver…
ServeurpersoCom f4746e0
chore: update webui build output
ServeurpersoCom fd5348b
webui: add early exit for unchanged content in markdown processing
ServeurpersoCom 76d4d58
chore: update webui build output
ServeurpersoCom 45abc7c
Update tools/server/webui/src/lib/components/app/chat/ChatAttachments…
ServeurpersoCom 7195ca1
chore: update webui build output
ServeurpersoCom cf5f06e
refactor: Cleanup
allozaur 18300bb
refactor: Cleanup
allozaur 63f27d0
refactor: Cleanup
allozaur be02833
refactor: Cleanup
allozaur b2753c5
refactor: Cleanup
allozaur 2cfffee
refactor: Cleanup
allozaur c62062c
refactor: Cleanup
allozaur 725d24f
refactor: Cleanup
allozaur c586771
refactor: MarkdownContent props API
allozaur d0509bd
refactor: Cleanup
allozaur 2d3fb9c
feat: Add `createBase64DataUrl` utility and `MimeTypeApplication.OCTE…
allozaur 2947242
refactor: Use `UrlPrefix` enum for data stream parsing
allozaur 0e6f530
refactor: Componentize MCP Resource Browser
allozaur 3c00ced
fix: Storybook
allozaur 63a4c2d
chore: update webui build output
allozaur 889a571
fix: handle MCP WebSocket disconnections with auto-reconnect (SDK pro…
ServeurpersoCom 8f64a97
webui: improve when lacking vertical space on mobile with keyboard open
ServeurpersoCom 143c926
chore: update webui build output
ServeurpersoCom 344eb38
fix: MCP WebSocket reconnection race conditions
ServeurpersoCom 274e3ba
chore: update webui build output
ServeurpersoCom 144a00b
feat: Improve Stop button UI
allozaur ac443ec
feat: Add McpServersSettings to Chat Settings "MCP" section
allozaur b45fbd4
refactor: Constants
allozaur 266139d
feat: Enable added MCP Server by default
allozaur 686f368
feat: Improve prompt picker keyboard navigation
allozaur 2bb5ce3
feat: Prompt Picker and Prompt Attachment UI/UX improvements
allozaur 7a52572
fix: UI improvements
allozaur 9276fd7
feat: Navigation UI improvements
allozaur bee9a50
chore: update webui build output
allozaur b9f8569
fix: Context info fixes & improvements
allozaur 4efce46
chore: update webui build output
allozaur 1450b4d
feat: MCP Resources
allozaur 63d01a3
fix: Syntax highlight for `svelte` and `vue`
allozaur 65ff62e
chore: update webui build output
allozaur 51f3607
fix: Naming
allozaur bf6c4ab
fix: Proper system message deletion logic
allozaur 1fb770f
refactor: Consolidate MCP server settings into ChatSettings
allozaur e026919
feat: Improve MCP server selection UX in chat form dropdown
allozaur 7e423ff
refactor: Cleanup
allozaur 2f44ba4
feat: Minor UI tweaks
allozaur 2ca3d0a
chore: update webui build output
allozaur b8bd31b
refactor: Cleanup
allozaur 9d5fdaa
feat: Implement resource search in MCP Resource browser
allozaur 00fb7a5
fix: MCP Resources Browser selection & attaching
allozaur db98bdf
fix: Improve word wrapping in resource preview
allozaur 07b6523
chore: update webui build output
allozaur e1c3038
chore: Formatting & linting
allozaur 518a57e
chore: update webui build output
allozaur 9dfc32f
refactor: Cleanup
allozaur 6ee8b29
refactor: Cleanup
allozaur 1a479f6
refactor: Redesign DropdownMenuSearchable as content provider
allozaur ddb80be
feat: Enable MCP prompt button in chat message edit form
allozaur b8ae88f
docs: Centralize and enhance service documentation
allozaur f8fd671
chore: update webui build output
allozaur 7f7ae52
feat: UI improvements
allozaur c6bd0f0
refactor: Move MCP health checks to background process from core layout
allozaur 85a53a3
refactor: Cleanup
allozaur a47b0dd
chore: update webui build output
allozaur 9e51894
chore: Update packages with `npm audit fix`
allozaur 6f0d9ee
chore: update webui build output
allozaur ddde7fc
fix: UI
allozaur e7d79cc
feat: Improve agentic turn visualization and statistics
allozaur a202918
docs: Update diagrams
allozaur 3922e28
chore: Formatting
allozaur 91bd128
chore: update webui build output
allozaur de1eb85
refactor: Cleanup
allozaur 8a0a17e
refactor: Consolidate MCP resource attachment components
allozaur 67b3714
feat: Improve styling for MCP resource attachment chip
allozaur 4b549c0
refactor: Use Svelte derived state for non-mutable reactive variables
allozaur ff974d0
refactor: Standardize MCP server ID generation and prefix
allozaur 8ad749b
refactor: `ConversationSelection` initial state handling & Minor fixes
allozaur b6107e8
build: align CMake and CI with master while keeping CORS proxy
allozaur e19904e
chore: update webui build output
allozaur 9610768
fix: Post-rebase fixes
allozaur a026637
chore: update webui build output
allozaur 278316e
fix: Post-rebase fixes
allozaur eba444d
chore: update webui build output
allozaur e3d89ba
feat: Add reusable ChatFormPickerPopover component and constant
allozaur bf0651e
refactor: Make ActionIconRemove icon size configurable
allozaur 8c784a6
refactor: Use ChatFormPickerPopover in ChatFormPromptPicker
allozaur cf3d6cd
feat: Implement inline MCP Resource Picker in ChatForm
allozaur af6323f
refactor: Shared chat form picker components
allozaur 269ade1
chore: update webui build output
allozaur 5ae0ab2
Merge remote-tracking branch 'origin/master' into allozaur/mcp-mvp
allozaur f467799
feat: Add onTurnComplete callback to properly display statistics duri…
allozaur b53a6bc
chore: update webui build output
allozaur f260d69
mcp: auto-recover StreamableHTTP sessions on server restart (HTTP 404)
ServeurpersoCom 68d5453
chore: update webui build output
ServeurpersoCom 168622e
feat: Apply input sanitization to KeyValuePairs form component
allozaur 3a06e76
feat: Apply common panel styling for sheets
allozaur 6239428
feat: Add mobile-optimized attachment selection sheet
allozaur e1d75b1
feat: Add mobile-optimized model selection sheet
allozaur 48c993e
feat: Adapt chat UI for mobile responsiveness
allozaur 105b973
fix: Improve tool execution error message
allozaur c3cfce6
fix: Improve MCP reconnect logic and robustness
allozaur 911ae8e
chore: update webui build output
allozaur 383d955
Merge remote-tracking branch 'origin/allozaur/mcp-mvp' into allozaur/…
allozaur e56c427
chore: update webui build output
allozaur a1dc854
webui: fallback for crypto.randomUUID in non-secure contexts (LAN HTTP)
ServeurpersoCom d03ccc3
chore: update webui build output
ServeurpersoCom 2516ec7
refactor: UUID handling
allozaur 3ff61f1
chore: update webui build output
allozaur 10b4c19
Merge remote-tracking branch 'origin/master' into allozaur/mcp-mvp
allozaur 94b833d
chore: update webui build output
allozaur e50cb83
add --webui-cors-proxy
ngxson 0d9ed25
rename to --webui-mcp-proxy
ngxson 4bcf69d
Merge remote-tracking branch 'origin/master' into allozaur/mcp-mvp
allozaur 2151426
feat: MCP Server Icons with Google Favicon fallback
allozaur fc4b2c6
fix: System Message UI
allozaur f0fcf90
feat: Implement MCP Resource Templates support in MCP Resources Browser
allozaur 698aa46
chore: update webui build output
allozaur 11a1c2d
webui: strip agentic display markers from context sent to LLM
ServeurpersoCom 4ad0db6
chore: format/lint/check/build
ServeurpersoCom f85286b
fix: Always pass MCP icons through CORS proxy
allozaur 8c2cf15
Merge remote-tracking branch 'origin/master' into allozaur/mcp-mvp
allozaur af17d87
chore: update webui build output
allozaur bc9c806
fix: Truncate raw model name in ModelId
allozaur 9243fa4
chore: update webui build output
allozaur 9673dd2
fix: Mobile UI fixes
allozaur 3110e58
feat: Update Models Selector Sheet
allozaur 4dd95d7
chore: update webui build output
allozaur d0a4564
refactor: Clean up import patterns
allozaur cfd09e0
chore: update webui build output
allozaur 3c1f1b8
refactor: Cleanup
allozaur 1424e9d
chore: update webui build output
allozaur 6782e74
fix: remove spurious slash prefix in model selector when orgName is null
ServeurpersoCom 6d0e1e6
chore: update webui build output
ServeurpersoCom File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| #pragma once | ||
|
|
||
| #include "common.h" | ||
| #include "http.h" | ||
|
|
||
| #include <string> | ||
| #include <unordered_set> | ||
| #include <list> | ||
| #include <map> | ||
|
|
||
| #include "server-http.h" | ||
|
|
||
| static server_http_res_ptr proxy_request(const server_http_req & req, std::string method) { | ||
| std::string target_url = req.get_param("url"); | ||
| common_http_url parsed_url = common_http_parse_url(target_url); | ||
|
|
||
| if (parsed_url.host.empty()) { | ||
| throw std::runtime_error("invalid target URL: missing host"); | ||
| } | ||
|
|
||
| if (parsed_url.path.empty()) { | ||
| parsed_url.path = "/"; | ||
| } | ||
|
|
||
| if (!parsed_url.password.empty()) { | ||
| throw std::runtime_error("authentication in target URL is not supported"); | ||
| } | ||
|
|
||
| if (parsed_url.scheme != "http" && parsed_url.scheme != "https") { | ||
| throw std::runtime_error("unsupported URL scheme in target URL: " + parsed_url.scheme); | ||
| } | ||
|
|
||
| SRV_INF("proxying %s request to %s://%s%s\n", method.c_str(), parsed_url.scheme.c_str(), parsed_url.host.c_str(), parsed_url.path.c_str()); | ||
|
|
||
| auto proxy = std::make_unique<server_http_proxy>( | ||
| method, | ||
| parsed_url.host, | ||
| parsed_url.scheme == "http" ? 80 : 443, | ||
| parsed_url.path, | ||
| req.headers, | ||
| req.body, | ||
| req.should_stop, | ||
| 600, // timeout_read (default to 10 minutes) | ||
| 600 // timeout_write (default to 10 minutes) | ||
| ); | ||
|
|
||
| return proxy; | ||
| } | ||
|
|
||
| static server_http_context::handler_t proxy_handler_post = [](const server_http_req & req) -> server_http_res_ptr { | ||
| return proxy_request(req, "POST"); | ||
| }; | ||
|
|
||
| static server_http_context::handler_t proxy_handler_get = [](const server_http_req & req) -> server_http_res_ptr { | ||
| return proxy_request(req, "GET"); | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
allozaur marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ngxson can you please take a look at the CORS proxy changes? they come from your draft PR from a while ago (ngxson#76) and i think it's a good moment to take a closer look at them and address the potential security issues that they might introduce.