webui: Server tools (#21237)
* wip: server_tools * feat: Integrate with `/tools` endpoint * feat: Builtin + MCP + JSON Schema Tools WIP * refactor * displayName -> display_name * snake_case everywhere * rm redundant field * feat: Improvements * chore: update webui build output * refactor: Updates after server updates * chore: update webui build output * change arg to --tools all * feat: UI improvements * chore: update webui build output * add readme mention * llama-gen-docs * chore: update webui build output * chore: update webui build output * chore: update webui build output * feat: Reorganize settings sections * feat: Separate dialogs for MCP Servers Settings and Import/Export * feat: WIP * feat: WIP * feat: WIP * feat: WIP * feat: WIP * feat: WIP * WIP on allozaur/20677-webui-server-tools * feat: UI improvements * chore: Update package lock * chore: Run `npm audit fix` * feat: UI WIP * feat: UI * refactor: Desktop Icon Strip DRY * feat: Cleaner rendering and transition for ChatScreen * feat: UI improvements * feat: UI improvement * feat: Remove MCP Server "enable" switch from Tools submenu * chore: Run `npm audit fix` * feat: WIP * feat: Logic improvements * refactor: Cleanup * refactor: DRY * test: Fix Chat Sidebar UI Tests * chore: Update package lock * refactor: Cleanup * feat: Chat Message Action Card with Continue and Permission flow implementations * feat: Add agentic steering messages, draft messages and improve chat UX * fix: Search results UI * test: Fix unit test * feat: UI/UX improvements * refactor: Simplify `useToolsPanel` access in components * feat: Implement Processing Info Context API * feat: Implement 'Go back to chat' functionality for settings * feat: Enhance MCP Server management in Chat Form Attachments * style: Minor UI and branding adjustments * chore: Update webui static build output * chore: Formatting, linting & type checks * feat: Draft messages logic * feat: UI improvements * feat: Steering Messages improvements * refactor: Cleanup * refactor: Cleanup * feat: Improve UI * refactor: Settings navigation hook * refactor: DRY code * refactor: DRY ChatMessageUser UI components * refactor: Desktop Icon Strip DRY * refactor: Tools & permissions * fix: Navigation condition * refactor: Cleanup * refactor: Cleanup * refactor: Cleanup * fix: preserve reasoning_content in agentic flow --------- Co-authored-by: Xuan Son Nguyen <son@huggingface.co>
This commit is contained in:
committed by
GitHub
parent
19821178be
commit
f42e29fdf1
@@ -10,3 +10,44 @@ export enum AttachmentType {
|
||||
TEXT = 'TEXT',
|
||||
LEGACY_CONTEXT = 'context' // Legacy attachment type for backward compatibility
|
||||
}
|
||||
|
||||
/**
|
||||
* Unique identifiers for attachment menu items in the chat form action dropdowns.
|
||||
* Used to select which file upload or attachment action is triggered.
|
||||
*/
|
||||
export enum AttachmentMenuItemId {
|
||||
IMAGES = 'images',
|
||||
AUDIO = 'audio',
|
||||
TEXT = 'text',
|
||||
PDF = 'pdf',
|
||||
SYSTEM_MESSAGE = 'system-message',
|
||||
MCP_PROMPT = 'mcp-prompt',
|
||||
MCP_RESOURCES = 'mcp-resources'
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines when an attachment menu item should be enabled.
|
||||
*/
|
||||
export enum AttachmentItemEnabledWhen {
|
||||
ALWAYS = 'always',
|
||||
HAS_VISION_MODALITY = 'hasVisionModality',
|
||||
HAS_AUDIO_MODALITY = 'hasAudioModality'
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the callback action triggered when an attachment menu item is clicked.
|
||||
*/
|
||||
export enum AttachmentAction {
|
||||
FILE_UPLOAD = 'onFileUpload',
|
||||
SYSTEM_PROMPT_CLICK = 'onSystemPromptClick',
|
||||
MCP_PROMPT_CLICK = 'onMcpPromptClick',
|
||||
MCP_RESOURCES_CLICK = 'onMcpResourcesClick'
|
||||
}
|
||||
|
||||
/**
|
||||
* Visibility conditions for attachment menu items.
|
||||
*/
|
||||
export enum AttachmentItemVisibleWhen {
|
||||
HAS_MCP_PROMPTS_SUPPORT = 'hasMcpPromptsSupport',
|
||||
HAS_MCP_RESOURCES_SUPPORT = 'hasMcpResourcesSupport'
|
||||
}
|
||||
|
||||
@@ -49,3 +49,8 @@ export enum ErrorDialogType {
|
||||
TIMEOUT = 'timeout',
|
||||
SERVER = 'server'
|
||||
}
|
||||
|
||||
export enum ConversationSelectionMode {
|
||||
EXPORT = 'export',
|
||||
IMPORT = 'import'
|
||||
}
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
export { AttachmentType } from './attachment';
|
||||
export {
|
||||
AttachmentType,
|
||||
AttachmentMenuItemId,
|
||||
AttachmentItemEnabledWhen,
|
||||
AttachmentAction,
|
||||
AttachmentItemVisibleWhen
|
||||
} from './attachment';
|
||||
|
||||
export { AgenticSectionType, ToolCallType } from './agentic';
|
||||
|
||||
export {
|
||||
ChatMessageStatsView,
|
||||
ContentPartType,
|
||||
ConversationSelectionMode,
|
||||
ErrorDialogType,
|
||||
MessageRole,
|
||||
MessageType,
|
||||
@@ -47,6 +54,8 @@ export { ServerRole, ServerModelStatus } from './server';
|
||||
|
||||
export { ParameterSource, SyncableParameterType, SettingsFieldType } from './settings';
|
||||
|
||||
export { ColorMode, McpPromptVariant, UrlProtocol } from './ui';
|
||||
export { ColorMode, HtmlInputType, McpPromptVariant, TooltipSide, UrlProtocol } from './ui';
|
||||
|
||||
export { KeyboardKey } from './keyboard';
|
||||
|
||||
export { ToolSource, ToolPermissionDecision, ToolResponseField } from './tools';
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
export enum ToolSource {
|
||||
BUILTIN = 'builtin',
|
||||
MCP = 'mcp',
|
||||
CUSTOM = 'custom'
|
||||
}
|
||||
|
||||
export enum ToolPermissionDecision {
|
||||
ALWAYS = 'always',
|
||||
ALWAYS_SERVER = 'always_server',
|
||||
ONCE = 'once',
|
||||
DENY = 'deny'
|
||||
}
|
||||
|
||||
export enum ToolResponseField {
|
||||
PLAIN_TEXT = 'plain_text_response',
|
||||
ERROR = 'error'
|
||||
}
|
||||
@@ -4,6 +4,13 @@ export enum ColorMode {
|
||||
SYSTEM = 'system'
|
||||
}
|
||||
|
||||
export enum TooltipSide {
|
||||
TOP = 'top',
|
||||
RIGHT = 'right',
|
||||
BOTTOM = 'bottom',
|
||||
LEFT = 'left'
|
||||
}
|
||||
|
||||
/**
|
||||
* MCP prompt display variant
|
||||
*/
|
||||
@@ -22,3 +29,7 @@ export enum UrlProtocol {
|
||||
WEBSOCKET = 'ws://',
|
||||
WEBSOCKET_SECURE = 'wss://'
|
||||
}
|
||||
|
||||
export enum HtmlInputType {
|
||||
FILE = 'file'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user