agent-orcha 0.0.5 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +250 -1275
- package/dist/lib/agents/agent-executor.d.ts +4 -2
- package/dist/lib/agents/agent-executor.d.ts.map +1 -1
- package/dist/lib/agents/agent-executor.js +85 -53
- package/dist/lib/agents/agent-executor.js.map +1 -1
- package/dist/lib/agents/agent-loader.d.ts +3 -0
- package/dist/lib/agents/agent-loader.d.ts.map +1 -1
- package/dist/lib/agents/agent-loader.js +10 -1
- package/dist/lib/agents/agent-loader.js.map +1 -1
- package/dist/lib/agents/react-loop.d.ts.map +1 -1
- package/dist/lib/agents/react-loop.js +207 -142
- package/dist/lib/agents/react-loop.js.map +1 -1
- package/dist/lib/agents/types.d.ts +181 -18
- package/dist/lib/agents/types.d.ts.map +1 -1
- package/dist/lib/agents/types.js +18 -2
- package/dist/lib/agents/types.js.map +1 -1
- package/dist/lib/functions/function-loader.d.ts +2 -0
- package/dist/lib/functions/function-loader.d.ts.map +1 -1
- package/dist/lib/functions/function-loader.js +10 -0
- package/dist/lib/functions/function-loader.js.map +1 -1
- package/dist/lib/functions/simple-function-wrapper.js +3 -3
- package/dist/lib/functions/simple-function-wrapper.js.map +1 -1
- package/dist/lib/integrations/email.d.ts +38 -0
- package/dist/lib/integrations/email.d.ts.map +1 -0
- package/dist/lib/integrations/email.js +249 -0
- package/dist/lib/integrations/email.js.map +1 -0
- package/dist/lib/integrations/integration-manager.d.ts +5 -0
- package/dist/lib/integrations/integration-manager.d.ts.map +1 -1
- package/dist/lib/integrations/integration-manager.js +53 -3
- package/dist/lib/integrations/integration-manager.js.map +1 -1
- package/dist/lib/integrations/types.d.ts +187 -4
- package/dist/lib/integrations/types.d.ts.map +1 -1
- package/dist/lib/integrations/types.js +24 -1
- package/dist/lib/integrations/types.js.map +1 -1
- package/dist/lib/knowledge/knowledge-store.d.ts +7 -1
- package/dist/lib/knowledge/knowledge-store.d.ts.map +1 -1
- package/dist/lib/knowledge/knowledge-store.js +96 -8
- package/dist/lib/knowledge/knowledge-store.js.map +1 -1
- package/dist/lib/knowledge/loaders/file-loaders.d.ts +8 -3
- package/dist/lib/knowledge/loaders/file-loaders.d.ts.map +1 -1
- package/dist/lib/knowledge/loaders/file-loaders.js +96 -75
- package/dist/lib/knowledge/loaders/file-loaders.js.map +1 -1
- package/dist/lib/knowledge/loaders/web-loader.d.ts +12 -3
- package/dist/lib/knowledge/loaders/web-loader.d.ts.map +1 -1
- package/dist/lib/knowledge/loaders/web-loader.js +56 -22
- package/dist/lib/knowledge/loaders/web-loader.js.map +1 -1
- package/dist/lib/knowledge/sqlite-store.d.ts.map +1 -1
- package/dist/lib/knowledge/sqlite-store.js +19 -10
- package/dist/lib/knowledge/sqlite-store.js.map +1 -1
- package/dist/lib/knowledge/types.d.ts +69 -33
- package/dist/lib/knowledge/types.d.ts.map +1 -1
- package/dist/lib/knowledge/types.js +18 -3
- package/dist/lib/knowledge/types.js.map +1 -1
- package/dist/lib/llm/index.d.ts +1 -1
- package/dist/lib/llm/index.d.ts.map +1 -1
- package/dist/lib/llm/index.js +1 -1
- package/dist/lib/llm/index.js.map +1 -1
- package/dist/lib/llm/llm-call-logger.d.ts +3 -1
- package/dist/lib/llm/llm-call-logger.d.ts.map +1 -1
- package/dist/lib/llm/llm-call-logger.js +31 -26
- package/dist/lib/llm/llm-call-logger.js.map +1 -1
- package/dist/lib/llm/llm-config.d.ts +59 -8
- package/dist/lib/llm/llm-config.d.ts.map +1 -1
- package/dist/lib/llm/llm-config.js +163 -17
- package/dist/lib/llm/llm-config.js.map +1 -1
- package/dist/lib/llm/llm-factory.d.ts +1 -2
- package/dist/lib/llm/llm-factory.d.ts.map +1 -1
- package/dist/lib/llm/llm-factory.js +44 -8
- package/dist/lib/llm/llm-factory.js.map +1 -1
- package/dist/lib/llm/providers/anthropic-chat-model.d.ts +5 -1
- package/dist/lib/llm/providers/anthropic-chat-model.d.ts.map +1 -1
- package/dist/lib/llm/providers/anthropic-chat-model.js +118 -42
- package/dist/lib/llm/providers/anthropic-chat-model.js.map +1 -1
- package/dist/lib/llm/providers/gemini-chat-model.d.ts +3 -2
- package/dist/lib/llm/providers/gemini-chat-model.d.ts.map +1 -1
- package/dist/lib/llm/providers/gemini-chat-model.js +83 -24
- package/dist/lib/llm/providers/gemini-chat-model.js.map +1 -1
- package/dist/lib/llm/providers/openai-chat-model.d.ts +20 -1
- package/dist/lib/llm/providers/openai-chat-model.d.ts.map +1 -1
- package/dist/lib/llm/providers/openai-chat-model.js +265 -32
- package/dist/lib/llm/providers/openai-chat-model.js.map +1 -1
- package/dist/lib/llm/providers/openai-embeddings.d.ts.map +1 -1
- package/dist/lib/llm/providers/openai-embeddings.js +41 -10
- package/dist/lib/llm/providers/openai-embeddings.js.map +1 -1
- package/dist/lib/local-llm/binary-manager.d.ts +66 -0
- package/dist/lib/local-llm/binary-manager.d.ts.map +1 -0
- package/dist/lib/local-llm/binary-manager.js +441 -0
- package/dist/lib/local-llm/binary-manager.js.map +1 -0
- package/dist/lib/local-llm/engine-interface.d.ts +47 -0
- package/dist/lib/local-llm/engine-interface.d.ts.map +1 -0
- package/dist/lib/local-llm/engine-interface.js +2 -0
- package/dist/lib/local-llm/engine-interface.js.map +1 -0
- package/dist/lib/local-llm/engine-registry.d.ts +20 -0
- package/dist/lib/local-llm/engine-registry.d.ts.map +1 -0
- package/dist/lib/local-llm/engine-registry.js +56 -0
- package/dist/lib/local-llm/engine-registry.js.map +1 -0
- package/dist/lib/local-llm/engines/llama-cpp-engine.d.ts +31 -0
- package/dist/lib/local-llm/engines/llama-cpp-engine.d.ts.map +1 -0
- package/dist/lib/local-llm/engines/llama-cpp-engine.js +164 -0
- package/dist/lib/local-llm/engines/llama-cpp-engine.js.map +1 -0
- package/dist/lib/local-llm/engines/mlx-serve-engine.d.ts +31 -0
- package/dist/lib/local-llm/engines/mlx-serve-engine.d.ts.map +1 -0
- package/dist/lib/local-llm/engines/mlx-serve-engine.js +161 -0
- package/dist/lib/local-llm/engines/mlx-serve-engine.js.map +1 -0
- package/dist/lib/local-llm/gguf-reader.d.ts +20 -0
- package/dist/lib/local-llm/gguf-reader.d.ts.map +1 -0
- package/dist/lib/local-llm/gguf-reader.js +190 -0
- package/dist/lib/local-llm/gguf-reader.js.map +1 -0
- package/dist/lib/local-llm/index.d.ts +9 -0
- package/dist/lib/local-llm/index.d.ts.map +1 -0
- package/dist/lib/local-llm/index.js +6 -0
- package/dist/lib/local-llm/index.js.map +1 -0
- package/dist/lib/local-llm/llama-server-process.d.ts +42 -0
- package/dist/lib/local-llm/llama-server-process.d.ts.map +1 -0
- package/dist/lib/local-llm/llama-server-process.js +237 -0
- package/dist/lib/local-llm/llama-server-process.js.map +1 -0
- package/dist/lib/local-llm/mlx-binary-manager.d.ts +33 -0
- package/dist/lib/local-llm/mlx-binary-manager.d.ts.map +1 -0
- package/dist/lib/local-llm/mlx-binary-manager.js +211 -0
- package/dist/lib/local-llm/mlx-binary-manager.js.map +1 -0
- package/dist/lib/local-llm/mlx-server-process.d.ts +26 -0
- package/dist/lib/local-llm/mlx-server-process.d.ts.map +1 -0
- package/dist/lib/local-llm/mlx-server-process.js +210 -0
- package/dist/lib/local-llm/mlx-server-process.js.map +1 -0
- package/dist/lib/local-llm/model-manager.d.ts +33 -0
- package/dist/lib/local-llm/model-manager.d.ts.map +1 -0
- package/dist/lib/local-llm/model-manager.js +591 -0
- package/dist/lib/local-llm/model-manager.js.map +1 -0
- package/dist/lib/local-llm/types.d.ts +51 -0
- package/dist/lib/local-llm/types.d.ts.map +1 -0
- package/dist/lib/local-llm/types.js +2 -0
- package/dist/lib/local-llm/types.js.map +1 -0
- package/dist/lib/logger.d.ts +2 -0
- package/dist/lib/logger.d.ts.map +1 -1
- package/dist/lib/logger.js +68 -6
- package/dist/lib/logger.js.map +1 -1
- package/dist/lib/mcp/mcp-client.d.ts.map +1 -1
- package/dist/lib/mcp/mcp-client.js +5 -3
- package/dist/lib/mcp/mcp-client.js.map +1 -1
- package/dist/lib/mcp/types.d.ts +0 -9
- package/dist/lib/mcp/types.d.ts.map +1 -1
- package/dist/lib/mcp/types.js +1 -2
- package/dist/lib/mcp/types.js.map +1 -1
- package/dist/lib/memory/memory-manager.d.ts +1 -0
- package/dist/lib/memory/memory-manager.d.ts.map +1 -1
- package/dist/lib/memory/memory-manager.js +9 -0
- package/dist/lib/memory/memory-manager.js.map +1 -1
- package/dist/lib/orchestrator.d.ts +11 -8
- package/dist/lib/orchestrator.d.ts.map +1 -1
- package/dist/lib/orchestrator.js +246 -5
- package/dist/lib/orchestrator.js.map +1 -1
- package/dist/lib/sandbox/cdp-client.d.ts +15 -0
- package/dist/lib/sandbox/cdp-client.d.ts.map +1 -0
- package/dist/lib/sandbox/cdp-client.js +139 -0
- package/dist/lib/sandbox/cdp-client.js.map +1 -0
- package/dist/lib/sandbox/html-to-markdown.d.ts +9 -1
- package/dist/lib/sandbox/html-to-markdown.d.ts.map +1 -1
- package/dist/lib/sandbox/html-to-markdown.js +67 -10
- package/dist/lib/sandbox/html-to-markdown.js.map +1 -1
- package/dist/lib/sandbox/index.d.ts +6 -0
- package/dist/lib/sandbox/index.d.ts.map +1 -1
- package/dist/lib/sandbox/index.js +5 -0
- package/dist/lib/sandbox/index.js.map +1 -1
- package/dist/lib/sandbox/page-readiness.d.ts +37 -0
- package/dist/lib/sandbox/page-readiness.d.ts.map +1 -0
- package/dist/lib/sandbox/page-readiness.js +268 -0
- package/dist/lib/sandbox/page-readiness.js.map +1 -0
- package/dist/lib/sandbox/sandbox-browser.d.ts +4 -0
- package/dist/lib/sandbox/sandbox-browser.d.ts.map +1 -0
- package/dist/lib/sandbox/sandbox-browser.js +316 -0
- package/dist/lib/sandbox/sandbox-browser.js.map +1 -0
- package/dist/lib/sandbox/sandbox-container.d.ts +39 -0
- package/dist/lib/sandbox/sandbox-container.d.ts.map +1 -0
- package/dist/lib/sandbox/sandbox-container.js +176 -0
- package/dist/lib/sandbox/sandbox-container.js.map +1 -0
- package/dist/lib/sandbox/sandbox-file.d.ts +4 -0
- package/dist/lib/sandbox/sandbox-file.d.ts.map +1 -0
- package/dist/lib/sandbox/sandbox-file.js +169 -0
- package/dist/lib/sandbox/sandbox-file.js.map +1 -0
- package/dist/lib/sandbox/sandbox-shell.d.ts +5 -0
- package/dist/lib/sandbox/sandbox-shell.d.ts.map +1 -0
- package/dist/lib/sandbox/sandbox-shell.js +111 -0
- package/dist/lib/sandbox/sandbox-shell.js.map +1 -0
- package/dist/lib/sandbox/sandbox-web.d.ts.map +1 -1
- package/dist/lib/sandbox/sandbox-web.js +64 -24
- package/dist/lib/sandbox/sandbox-web.js.map +1 -1
- package/dist/lib/sandbox/types.d.ts +9 -0
- package/dist/lib/sandbox/types.d.ts.map +1 -1
- package/dist/lib/sandbox/types.js +1 -0
- package/dist/lib/sandbox/types.js.map +1 -1
- package/dist/lib/sandbox/vision-browser.d.ts +4 -0
- package/dist/lib/sandbox/vision-browser.d.ts.map +1 -0
- package/dist/lib/sandbox/vision-browser.js +298 -0
- package/dist/lib/sandbox/vision-browser.js.map +1 -0
- package/dist/lib/sea/app-window.d.ts +7 -0
- package/dist/lib/sea/app-window.d.ts.map +1 -0
- package/dist/lib/sea/app-window.js +95 -0
- package/dist/lib/sea/app-window.js.map +1 -0
- package/dist/lib/sea/bootstrap.d.ts +18 -0
- package/dist/lib/sea/bootstrap.d.ts.map +1 -0
- package/dist/lib/sea/bootstrap.js +103 -0
- package/dist/lib/sea/bootstrap.js.map +1 -0
- package/dist/lib/sea/sqlite-vec-shim.d.ts +3 -0
- package/dist/lib/sea/sqlite-vec-shim.d.ts.map +1 -0
- package/dist/lib/sea/sqlite-vec-shim.js +10 -0
- package/dist/lib/sea/sqlite-vec-shim.js.map +1 -0
- package/dist/lib/skills/skill-loader.d.ts +2 -0
- package/dist/lib/skills/skill-loader.d.ts.map +1 -1
- package/dist/lib/skills/skill-loader.js +12 -1
- package/dist/lib/skills/skill-loader.js.map +1 -1
- package/dist/lib/tasks/task-manager.d.ts +3 -1
- package/dist/lib/tasks/task-manager.d.ts.map +1 -1
- package/dist/lib/tasks/task-manager.js +11 -0
- package/dist/lib/tasks/task-manager.js.map +1 -1
- package/dist/lib/tasks/task-store.d.ts +1 -1
- package/dist/lib/tasks/task-store.d.ts.map +1 -1
- package/dist/lib/tasks/task-store.js.map +1 -1
- package/dist/lib/tasks/types.d.ts +18 -0
- package/dist/lib/tasks/types.d.ts.map +1 -1
- package/dist/lib/tools/built-in/integration-tools.d.ts +4 -0
- package/dist/lib/tools/built-in/integration-tools.d.ts.map +1 -0
- package/dist/lib/tools/built-in/integration-tools.js +47 -0
- package/dist/lib/tools/built-in/integration-tools.js.map +1 -0
- package/dist/lib/tools/built-in/knowledge-entity-lookup.tool.d.ts +1 -2
- package/dist/lib/tools/built-in/knowledge-entity-lookup.tool.d.ts.map +1 -1
- package/dist/lib/tools/built-in/knowledge-entity-lookup.tool.js +17 -17
- package/dist/lib/tools/built-in/knowledge-entity-lookup.tool.js.map +1 -1
- package/dist/lib/tools/built-in/knowledge-graph-schema.tool.d.ts.map +1 -1
- package/dist/lib/tools/built-in/knowledge-graph-schema.tool.js +2 -4
- package/dist/lib/tools/built-in/knowledge-graph-schema.tool.js.map +1 -1
- package/dist/lib/tools/built-in/knowledge-search.tool.js +4 -4
- package/dist/lib/tools/built-in/knowledge-search.tool.js.map +1 -1
- package/dist/lib/tools/built-in/knowledge-sql.tool.d.ts.map +1 -1
- package/dist/lib/tools/built-in/knowledge-sql.tool.js +74 -40
- package/dist/lib/tools/built-in/knowledge-sql.tool.js.map +1 -1
- package/dist/lib/tools/built-in/knowledge-tools-factory.js +2 -2
- package/dist/lib/tools/built-in/knowledge-tools-factory.js.map +1 -1
- package/dist/lib/tools/built-in/knowledge-traverse.tool.d.ts +1 -2
- package/dist/lib/tools/built-in/knowledge-traverse.tool.d.ts.map +1 -1
- package/dist/lib/tools/built-in/knowledge-traverse.tool.js +5 -11
- package/dist/lib/tools/built-in/knowledge-traverse.tool.js.map +1 -1
- package/dist/lib/tools/built-in/query-validators.d.ts.map +1 -1
- package/dist/lib/tools/built-in/query-validators.js +4 -0
- package/dist/lib/tools/built-in/query-validators.js.map +1 -1
- package/dist/lib/tools/workspace/workspace-tools.d.ts +1 -0
- package/dist/lib/tools/workspace/workspace-tools.d.ts.map +1 -1
- package/dist/lib/tools/workspace/workspace-tools.js +44 -4
- package/dist/lib/tools/workspace/workspace-tools.js.map +1 -1
- package/dist/lib/triggers/cron-trigger.d.ts +1 -1
- package/dist/lib/triggers/cron-trigger.d.ts.map +1 -1
- package/dist/lib/triggers/cron-trigger.js.map +1 -1
- package/dist/lib/triggers/trigger-manager.d.ts +1 -0
- package/dist/lib/triggers/trigger-manager.d.ts.map +1 -1
- package/dist/lib/triggers/trigger-manager.js +26 -0
- package/dist/lib/triggers/trigger-manager.js.map +1 -1
- package/dist/lib/triggers/webhook-trigger.d.ts +1 -1
- package/dist/lib/triggers/webhook-trigger.d.ts.map +1 -1
- package/dist/lib/triggers/webhook-trigger.js.map +1 -1
- package/dist/lib/types/llm-types.d.ts +22 -4
- package/dist/lib/types/llm-types.d.ts.map +1 -1
- package/dist/lib/types/llm-types.js +50 -0
- package/dist/lib/types/llm-types.js.map +1 -1
- package/dist/lib/types/tool-factory.d.ts +2 -2
- package/dist/lib/types/tool-factory.d.ts.map +1 -1
- package/dist/lib/types/tool-factory.js +9 -2
- package/dist/lib/types/tool-factory.js.map +1 -1
- package/dist/lib/utils/document-extract.d.ts +10 -0
- package/dist/lib/utils/document-extract.d.ts.map +1 -0
- package/dist/lib/utils/document-extract.js +149 -0
- package/dist/lib/utils/document-extract.js.map +1 -0
- package/dist/lib/utils/env-substitution.d.ts +6 -0
- package/dist/lib/utils/env-substitution.d.ts.map +1 -0
- package/dist/lib/utils/env-substitution.js +15 -0
- package/dist/lib/utils/env-substitution.js.map +1 -0
- package/dist/lib/workflows/react-workflow-executor.d.ts.map +1 -1
- package/dist/lib/workflows/react-workflow-executor.js +23 -17
- package/dist/lib/workflows/react-workflow-executor.js.map +1 -1
- package/dist/lib/workflows/types.d.ts +81 -55
- package/dist/lib/workflows/types.d.ts.map +1 -1
- package/dist/lib/workflows/types.js +10 -0
- package/dist/lib/workflows/types.js.map +1 -1
- package/dist/lib/workflows/workflow-loader.d.ts +3 -0
- package/dist/lib/workflows/workflow-loader.d.ts.map +1 -1
- package/dist/lib/workflows/workflow-loader.js +10 -1
- package/dist/lib/workflows/workflow-loader.js.map +1 -1
- package/dist/public/assets/logo.png +0 -0
- package/dist/public/chat.html +39 -0
- package/dist/public/index.html +6 -176
- package/dist/public/src/components/AgentComposer.js +807 -0
- package/dist/public/src/components/AgentsView.js +1812 -508
- package/dist/public/src/components/AppRoot.js +125 -38
- package/dist/public/src/components/GraphView.js +382 -300
- package/dist/public/src/components/IdeView.js +277 -86
- package/dist/public/src/components/KnowledgeView.js +94 -130
- package/dist/public/src/components/LlmView.js +15 -19
- package/dist/public/src/components/LocalLlmView.js +2440 -0
- package/dist/public/src/components/LogViewer.js +155 -0
- package/dist/public/src/components/McpView.js +41 -49
- package/dist/public/src/components/MonitorView.js +174 -83
- package/dist/public/src/components/NavBar.js +16 -26
- package/dist/public/src/components/StandaloneChat.js +875 -0
- package/dist/public/src/services/ApiService.js +203 -4
- package/dist/public/src/services/SessionStore.js +86 -0
- package/dist/public/src/services/StreamManager.js +183 -0
- package/dist/public/src/store.js +1 -3
- package/dist/public/src/utils/card.js +21 -0
- package/dist/public/src/utils/markdown.js +7 -0
- package/dist/public/styles.css +2777 -0
- package/dist/src/cli/commands/init.d.ts.map +1 -1
- package/dist/src/cli/commands/init.js +7 -1
- package/dist/src/cli/commands/init.js.map +1 -1
- package/dist/src/cli/commands/start.d.ts.map +1 -1
- package/dist/src/cli/commands/start.js +28 -5
- package/dist/src/cli/commands/start.js.map +1 -1
- package/dist/src/cli/index.js +19 -5
- package/dist/src/cli/index.js.map +1 -1
- package/dist/src/index.js +7 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/middleware/auth.d.ts.map +1 -1
- package/dist/src/middleware/auth.js +28 -6
- package/dist/src/middleware/auth.js.map +1 -1
- package/dist/src/middleware/rate-limit.d.ts +8 -0
- package/dist/src/middleware/rate-limit.d.ts.map +1 -0
- package/dist/src/middleware/rate-limit.js +21 -0
- package/dist/src/middleware/rate-limit.js.map +1 -0
- package/dist/src/routes/agents.route.d.ts.map +1 -1
- package/dist/src/routes/agents.route.js +138 -10
- package/dist/src/routes/agents.route.js.map +1 -1
- package/dist/src/routes/chat.route.d.ts +3 -0
- package/dist/src/routes/chat.route.d.ts.map +1 -0
- package/dist/src/routes/chat.route.js +156 -0
- package/dist/src/routes/chat.route.js.map +1 -0
- package/dist/src/routes/files.route.d.ts.map +1 -1
- package/dist/src/routes/files.route.js +37 -2
- package/dist/src/routes/files.route.js.map +1 -1
- package/dist/src/routes/llm.route.d.ts.map +1 -1
- package/dist/src/routes/llm.route.js +263 -8
- package/dist/src/routes/llm.route.js.map +1 -1
- package/dist/src/routes/local-llm.route.d.ts +3 -0
- package/dist/src/routes/local-llm.route.d.ts.map +1 -0
- package/dist/src/routes/local-llm.route.js +688 -0
- package/dist/src/routes/local-llm.route.js.map +1 -0
- package/dist/src/routes/logs.route.d.ts +3 -0
- package/dist/src/routes/logs.route.d.ts.map +1 -0
- package/dist/src/routes/logs.route.js +24 -0
- package/dist/src/routes/logs.route.js.map +1 -0
- package/dist/src/routes/tasks.route.d.ts.map +1 -1
- package/dist/src/routes/tasks.route.js +15 -1
- package/dist/src/routes/tasks.route.js.map +1 -1
- package/dist/src/routes/vnc.route.d.ts +12 -0
- package/dist/src/routes/vnc.route.d.ts.map +1 -0
- package/dist/src/routes/vnc.route.js +74 -0
- package/dist/src/routes/vnc.route.js.map +1 -0
- package/dist/src/routes/workflows.route.d.ts.map +1 -1
- package/dist/src/routes/workflows.route.js +24 -0
- package/dist/src/routes/workflows.route.js.map +1 -1
- package/dist/src/server.d.ts.map +1 -1
- package/dist/src/server.js +29 -3
- package/dist/src/server.js.map +1 -1
- package/dist/templates/Demo.md +152 -0
- package/dist/templates/README.md +12 -3
- package/dist/templates/agents/actor.agent.yaml +34 -0
- package/dist/templates/agents/architect.agent.yaml +20 -13
- package/dist/templates/agents/chatbot.agent.yaml +23 -27
- package/dist/templates/agents/corporate.agent.yaml +64 -0
- package/dist/templates/agents/functions.agent.yaml +29 -0
- package/dist/templates/agents/investment-analyst.agent.yaml +79 -0
- package/dist/templates/agents/music-librarian.agent.yaml +46 -0
- package/dist/templates/agents/network-security.agent.yaml +81 -0
- package/dist/templates/agents/transport-security.agent.yaml +69 -0
- package/dist/templates/agents/web-engineer.agent.yaml +98 -0
- package/dist/templates/agents/web-pilot.agent.yaml +57 -0
- package/dist/templates/knowledge/music-store/LICENSE.md +11 -0
- package/dist/templates/knowledge/music-store/musicstore.sqlite +0 -0
- package/dist/templates/knowledge/music-store/tables.png +0 -0
- package/dist/templates/knowledge/music-store.knowledge.yaml +138 -0
- package/dist/templates/knowledge/org-chart/personnel.csv +21 -21
- package/dist/templates/knowledge/org-chart.knowledge.yaml +4 -0
- package/dist/templates/knowledge/patient-records.knowledge.yaml +20 -0
- package/dist/templates/knowledge/pdf-patients/PDF_Deid_Deidentification_0.pdf +0 -0
- package/dist/templates/knowledge/pdf-patients/PDF_Deid_Deidentification_1.pdf +0 -0
- package/dist/templates/knowledge/pdf-patients/PDF_Deid_Deidentification_10.pdf +0 -0
- package/dist/templates/knowledge/pdf-patients/PDF_Deid_Deidentification_11.pdf +0 -0
- package/dist/templates/knowledge/pet-store.knowledge.yaml +3 -0
- package/dist/templates/knowledge/security-incidents/incidents.json +55935 -0
- package/dist/templates/knowledge/security-incidents.knowledge.yaml +46 -0
- package/dist/templates/knowledge/{example.knowledge.yaml → transcripts.knowledge.yaml} +9 -5
- package/dist/templates/knowledge/transport-ot/systems.csv +117 -0
- package/dist/templates/knowledge/transport-ot.knowledge.yaml +55 -0
- package/dist/templates/knowledge/web-docs.knowledge.yaml +1 -1
- package/dist/templates/llm.json +62 -22
- package/dist/templates/mcp.json +7 -4
- package/dist/templates/skills/orcha-builder/SKILL.md +148 -215
- package/dist/templates/skills/pii-guard/SKILL.md +22 -0
- package/dist/templates/skills/sandbox/SKILL.md +25 -48
- package/dist/templates/skills/web-pilot/SKILL.md +51 -0
- package/dist/templates/workflows/example.workflow.yaml +27 -35
- package/dist/templates/workflows/react-example.workflow.yaml +14 -19
- package/dist/templates/workflows/team-chat.workflow.yaml +47 -0
- package/package.json +17 -4
- package/dist/public/src/components/SkillsView.js +0 -137
- package/dist/public/src/components/WorkflowsView.js +0 -416
- package/dist/templates/agents/knowledge-broker.agent.yaml +0 -39
- package/dist/templates/agents/sandbox.agent.yaml +0 -56
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { Component } from '../utils/Component.js';
|
|
3
3
|
import { api } from '../services/ApiService.js';
|
|
4
|
+
import { resourceCard, badge, statusDot as sharedStatusDot, escapeHtml } from '../utils/card.js';
|
|
4
5
|
|
|
5
6
|
export class KnowledgeView extends Component {
|
|
6
7
|
constructor() {
|
|
@@ -94,32 +95,34 @@ export class KnowledgeView extends Component {
|
|
|
94
95
|
if (!container) return;
|
|
95
96
|
|
|
96
97
|
if (this.stores.length === 0) {
|
|
97
|
-
container.innerHTML = '<div class="text-
|
|
98
|
+
container.innerHTML = '<div class="text-muted italic text-center py-4">No knowledge stores configured</div>';
|
|
98
99
|
return;
|
|
99
100
|
}
|
|
100
101
|
|
|
101
|
-
container.innerHTML = this.stores.map(store =>
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
102
|
+
container.innerHTML = this.stores.map(store => {
|
|
103
|
+
const isSelected = this.selectedStore?.name === store.name;
|
|
104
|
+
return resourceCard({
|
|
105
|
+
id: store.name,
|
|
106
|
+
selected: isSelected,
|
|
107
|
+
content: `
|
|
108
|
+
<div class="flex items-center justify-between mb-2">
|
|
109
|
+
<span class="font-semibold text-primary text-sm truncate">${escapeHtml(store.name)}</span>
|
|
110
|
+
${this.statusDot(store)}
|
|
111
|
+
</div>
|
|
112
|
+
<div class="flex items-center gap-2 mb-2 flex-wrap">
|
|
113
|
+
${this.kindBadge(store)}
|
|
114
|
+
${this.sourceTypeBadge(store.source?.type)}
|
|
115
|
+
${this.storeBadge(store.store)}
|
|
116
|
+
</div>
|
|
117
|
+
<div class="text-xs text-secondary">
|
|
118
|
+
${store.status === 'indexed' ? this.formatCounts(store) : store.status === 'error' ? 'Error' : 'Not indexed'}
|
|
119
|
+
${store.defaultK ? `<span class="ml-2 text-muted">K=${store.defaultK}</span>` : ''}
|
|
120
|
+
</div>
|
|
121
|
+
${store.lastIndexedAt ? `<div class="text-xs text-muted mt-1">${this.timeAgo(store.lastIndexedAt)}</div>` : ''}
|
|
122
|
+
`,
|
|
123
|
+
className: 'knowledge-card p-4',
|
|
124
|
+
});
|
|
125
|
+
}).join('');
|
|
123
126
|
|
|
124
127
|
// Bind click handlers
|
|
125
128
|
container.querySelectorAll('.knowledge-card').forEach(card => {
|
|
@@ -142,7 +145,7 @@ export class KnowledgeView extends Component {
|
|
|
142
145
|
const container = this.querySelector('#knowledgeDetail');
|
|
143
146
|
if (!container || !this.selectedStore) {
|
|
144
147
|
if (container) {
|
|
145
|
-
container.innerHTML = '<div class="text-
|
|
148
|
+
container.innerHTML = '<div class="text-muted italic text-center py-4">Select a knowledge store to view details</div>';
|
|
146
149
|
}
|
|
147
150
|
return;
|
|
148
151
|
}
|
|
@@ -153,46 +156,41 @@ export class KnowledgeView extends Component {
|
|
|
153
156
|
const isError = store.status === 'error';
|
|
154
157
|
|
|
155
158
|
container.innerHTML = `
|
|
156
|
-
<!-- Header -->
|
|
157
159
|
<div class="flex items-start justify-between mb-6">
|
|
158
160
|
<div>
|
|
159
|
-
<h2 class="text-lg font-bold text-
|
|
160
|
-
<p class="text-sm text-
|
|
161
|
+
<h2 class="text-lg font-bold text-primary mb-1">${this.escapeHtml(store.name)}</h2>
|
|
162
|
+
<p class="text-sm text-secondary">${this.escapeHtml(store.description || 'No description')}</p>
|
|
161
163
|
<div class="flex items-center gap-2 mt-2">
|
|
162
164
|
${this.kindBadge(store)}
|
|
163
165
|
${this.statusBadge(store)}
|
|
164
166
|
</div>
|
|
165
167
|
</div>
|
|
166
|
-
<button id="indexBtn"
|
|
167
|
-
class="bg-orange-600 hover:bg-orange-700 disabled:bg-gray-700 disabled:cursor-not-allowed text-white font-medium px-4 py-2 rounded-lg transition-colors text-sm flex items-center gap-2"
|
|
168
|
-
${isIndexing ? 'disabled' : ''}>
|
|
168
|
+
<button id="indexBtn" class="btn btn-accent btn-sm" ${isIndexing ? 'disabled' : ''}>
|
|
169
169
|
${isIndexing
|
|
170
|
-
? '<span class="
|
|
170
|
+
? '<span class="spinner-sm"></span> Indexing...'
|
|
171
171
|
: isIndexed ? '<i class="fas fa-sync-alt"></i> Re-index' : '<i class="fas fa-play"></i> Index'}
|
|
172
172
|
</button>
|
|
173
173
|
</div>
|
|
174
174
|
|
|
175
175
|
${isError && store.errorMessage ? `
|
|
176
|
-
<div class="
|
|
177
|
-
<div class="text-red
|
|
176
|
+
<div class="badge-outline-red rounded-lg p-3 mb-4">
|
|
177
|
+
<div class="text-red text-sm"><i class="fas fa-exclamation-triangle mr-2"></i>${this.escapeHtml(store.errorMessage)}</div>
|
|
178
178
|
</div>` : ''}
|
|
179
179
|
|
|
180
|
-
<!-- Progress -->
|
|
181
180
|
<div id="progressSection" class="${isIndexing ? '' : 'hidden'} mb-6">
|
|
182
|
-
<div class="
|
|
181
|
+
<div class="panel">
|
|
183
182
|
<div class="flex items-center justify-between mb-2">
|
|
184
|
-
<span id="progressPhase" class="text-sm text-
|
|
185
|
-
<span id="progressElapsed" class="text-xs text-
|
|
183
|
+
<span id="progressPhase" class="text-sm text-primary">Preparing...</span>
|
|
184
|
+
<span id="progressElapsed" class="text-xs text-muted font-mono"></span>
|
|
186
185
|
</div>
|
|
187
|
-
<div class="
|
|
188
|
-
<div id="progressBar" class="
|
|
186
|
+
<div class="progress-track">
|
|
187
|
+
<div id="progressBar" class="progress-fill transition-all"></div>
|
|
189
188
|
</div>
|
|
190
|
-
<div id="progressMessage" class="text-xs text-
|
|
189
|
+
<div id="progressMessage" class="text-xs text-muted mt-1"></div>
|
|
191
190
|
</div>
|
|
192
191
|
</div>
|
|
193
192
|
|
|
194
|
-
|
|
195
|
-
<div class="grid grid-cols-2 md:grid-cols-4 gap-3 mb-6">
|
|
193
|
+
<div class="grid grid-cols-4 gap-3 mb-6">
|
|
196
194
|
${this.statCard('Documents', store.documentCount, 'fa-file-alt')}
|
|
197
195
|
${this.statCard('Chunks', store.chunkCount, 'fa-puzzle-piece')}
|
|
198
196
|
${store.hasGraph ? this.statCard('Entities', store.entityCount, 'fa-project-diagram') : ''}
|
|
@@ -200,53 +198,30 @@ export class KnowledgeView extends Component {
|
|
|
200
198
|
${store.hasGraph ? this.statCard('Communities', store.communityCount, 'fa-layer-group') : ''}
|
|
201
199
|
</div>
|
|
202
200
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
<div class="
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
</div
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
<div class="text-gray-200 mt-1">${this.storeBadge(store.store)}</div>
|
|
212
|
-
</div>
|
|
213
|
-
<div class="bg-dark-surface/50 border border-dark-border rounded-lg p-3">
|
|
214
|
-
<span class="text-gray-500">Default K</span>
|
|
215
|
-
<div class="text-gray-200 mt-1">${store.defaultK ?? 'N/A'}</div>
|
|
216
|
-
</div>
|
|
217
|
-
<div class="bg-dark-surface/50 border border-dark-border rounded-lg p-3">
|
|
218
|
-
<span class="text-gray-500">Embedding</span>
|
|
219
|
-
<div class="text-gray-200 mt-1">${store.embeddingModel || 'default'}</div>
|
|
220
|
-
</div>
|
|
221
|
-
<div class="bg-dark-surface/50 border border-dark-border rounded-lg p-3">
|
|
222
|
-
<span class="text-gray-500">Last Indexed</span>
|
|
223
|
-
<div class="text-gray-200 mt-1">${store.lastIndexedAt ? this.timeAgo(store.lastIndexedAt) : 'Never'}
|
|
224
|
-
${store.lastIndexDurationMs ? `<span class="text-gray-500 text-xs ml-1">(${this.formatDuration(store.lastIndexDurationMs)})</span>` : ''}
|
|
225
|
-
</div>
|
|
226
|
-
</div>
|
|
201
|
+
<div class="grid grid-cols-2 gap-3 mb-6 text-sm">
|
|
202
|
+
<div class="panel-sm"><span class="text-muted">Source Type</span><div class="text-primary mt-1">${store.source?.type || 'N/A'}</div></div>
|
|
203
|
+
<div class="panel-sm"><span class="text-muted">Store</span><div class="text-primary mt-1">${this.storeBadge(store.store)}</div></div>
|
|
204
|
+
<div class="panel-sm"><span class="text-muted">Default K</span><div class="text-primary mt-1">${store.defaultK ?? 'N/A'}</div></div>
|
|
205
|
+
<div class="panel-sm"><span class="text-muted">Embedding</span><div class="text-primary mt-1">${store.embeddingModel || 'default'}</div></div>
|
|
206
|
+
<div class="panel-sm"><span class="text-muted">Last Indexed</span><div class="text-primary mt-1">${store.lastIndexedAt ? this.timeAgo(store.lastIndexedAt) : 'Never'}
|
|
207
|
+
${store.lastIndexDurationMs ? `<span class="text-muted text-xs ml-1">(${this.formatDuration(store.lastIndexDurationMs)})</span>` : ''}
|
|
208
|
+
</div></div>
|
|
227
209
|
</div>
|
|
228
210
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
<h3 class="text-sm font-semibold text-gray-300 mb-3">Search</h3>
|
|
211
|
+
<div class="border-t pt-4">
|
|
212
|
+
<h3 class="text-sm font-semibold text-primary mb-3">Search</h3>
|
|
232
213
|
<div class="space-y-3">
|
|
233
214
|
<textarea id="searchQuery" rows="3" placeholder="Enter search query..."
|
|
234
|
-
class="
|
|
235
|
-
${!isIndexed ? 'disabled' : ''}></textarea>
|
|
215
|
+
class="textarea text-sm" ${!isIndexed ? 'disabled' : ''}></textarea>
|
|
236
216
|
<div class="flex items-center gap-3">
|
|
237
|
-
<button id="searchBtn"
|
|
238
|
-
class="bg-orange-600 hover:bg-orange-700 disabled:bg-gray-700 disabled:cursor-not-allowed text-white font-medium px-5 py-2 rounded-lg transition-colors text-sm"
|
|
239
|
-
${!isIndexed ? 'disabled' : ''}>
|
|
240
|
-
Search
|
|
241
|
-
</button>
|
|
217
|
+
<button id="searchBtn" class="btn btn-accent btn-sm" ${!isIndexed ? 'disabled' : ''}>Search</button>
|
|
242
218
|
<div class="flex items-center gap-2">
|
|
243
|
-
<label class="text-xs text-
|
|
244
|
-
<input type="number" id="searchK" value="${store.defaultK ?? 4}" min="1" max="20"
|
|
245
|
-
class="w-16 bg-dark-surface border border-dark-border rounded-lg px-2 py-1.5 text-gray-100 text-sm focus:outline-none focus:ring-2 focus:ring-orange-500">
|
|
219
|
+
<label class="text-xs text-secondary">Results:</label>
|
|
220
|
+
<input type="number" id="searchK" value="${store.defaultK ?? 4}" min="1" max="20" class="input text-sm">
|
|
246
221
|
</div>
|
|
247
222
|
</div>
|
|
248
|
-
<div id="searchResults"
|
|
249
|
-
${!isIndexed ? '<div class="text-
|
|
223
|
+
<div id="searchResults">
|
|
224
|
+
${!isIndexed ? '<div class="text-muted italic text-center py-4 text-sm">Index this store to enable search</div>' : ''}
|
|
250
225
|
</div>
|
|
251
226
|
</div>
|
|
252
227
|
</div>
|
|
@@ -344,59 +319,50 @@ export class KnowledgeView extends Component {
|
|
|
344
319
|
const resultsEl = this.querySelector('#searchResults');
|
|
345
320
|
if (!resultsEl) return;
|
|
346
321
|
|
|
347
|
-
resultsEl.innerHTML = '<div class="text-
|
|
322
|
+
resultsEl.innerHTML = '<div class="text-secondary italic text-center py-4 text-sm">Searching...</div>';
|
|
348
323
|
|
|
349
324
|
try {
|
|
350
325
|
const res = await api.searchKnowledgeStore(this.selectedStore.name, query, k);
|
|
351
326
|
const results = Array.isArray(res) ? res : res.results || [];
|
|
352
327
|
|
|
353
328
|
if (results.length === 0) {
|
|
354
|
-
resultsEl.innerHTML = '<div class="text-
|
|
329
|
+
resultsEl.innerHTML = '<div class="text-muted italic text-center py-4 text-sm">No results found</div>';
|
|
355
330
|
return;
|
|
356
331
|
}
|
|
357
332
|
|
|
358
333
|
resultsEl.innerHTML = results.map((r, i) => `
|
|
359
|
-
<div class="
|
|
360
|
-
<div class="flex items-center justify-between mb-2 pb-2 border-b
|
|
361
|
-
<span class="font-medium text-
|
|
362
|
-
<span class="text-xs font-mono text-
|
|
334
|
+
<div class="panel-sm mb-3">
|
|
335
|
+
<div class="flex items-center justify-between mb-2 pb-2 border-b">
|
|
336
|
+
<span class="font-medium text-primary text-sm">Result ${i + 1}</span>
|
|
337
|
+
<span class="text-xs font-mono text-secondary">Score: ${r.score?.toFixed(3)}</span>
|
|
363
338
|
</div>
|
|
364
|
-
<div class="text-sm text-
|
|
365
|
-
<div class="text-xs text-
|
|
366
|
-
${r.metadata ? Object.entries(r.metadata).map(([k, v]) => `<span class="mr-3"><span class="text-
|
|
339
|
+
<div class="text-sm text-primary mb-2 whitespace-pre-wrap">${this.escapeHtml(r.content)}</div>
|
|
340
|
+
<div class="text-xs text-muted">
|
|
341
|
+
${r.metadata ? Object.entries(r.metadata).map(([k, v]) => `<span class="mr-3"><span class="text-muted">${k}:</span> ${v}</span>`).join('') : ''}
|
|
367
342
|
</div>
|
|
368
343
|
</div>
|
|
369
344
|
`).join('');
|
|
370
345
|
|
|
371
346
|
} catch (e) {
|
|
372
|
-
resultsEl.innerHTML = `<div class="text-red
|
|
347
|
+
resultsEl.innerHTML = `<div class="text-red text-center text-sm">Error: ${e.message}</div>`;
|
|
373
348
|
}
|
|
374
349
|
}
|
|
375
350
|
|
|
376
351
|
// --- Helpers ---
|
|
377
352
|
|
|
378
353
|
statusDot(store) {
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
}
|
|
382
|
-
const colors = {
|
|
383
|
-
indexed: 'bg-green-400',
|
|
384
|
-
error: 'bg-red-400',
|
|
385
|
-
not_indexed: 'bg-gray-500',
|
|
386
|
-
};
|
|
387
|
-
return `<span class="inline-block w-2.5 h-2.5 rounded-full ${colors[store.status] || colors.not_indexed} flex-shrink-0"></span>`;
|
|
354
|
+
const status = store.isIndexing || store.status === 'indexing' ? 'indexing' : store.status || 'not_indexed';
|
|
355
|
+
return `<span class="status-dot status-dot-${status}"></span>`;
|
|
388
356
|
}
|
|
389
357
|
|
|
390
358
|
kindBadge(store) {
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
return '<span class="text-xs font-medium px-2 py-0.5 rounded bg-blue-900/50 text-blue-300 border border-blue-700/50">vector</span>';
|
|
359
|
+
return store.hasGraph
|
|
360
|
+
? '<span class="badge badge-outline-purple">graph</span>'
|
|
361
|
+
: '<span class="badge badge-outline-blue">vector</span>';
|
|
395
362
|
}
|
|
396
363
|
|
|
397
364
|
storeBadge(type) {
|
|
398
|
-
|
|
399
|
-
return `<span class="text-xs font-medium px-2 py-0.5 rounded bg-gray-800 text-gray-400 border border-gray-700">${this.escapeHtml(storeType)}</span>`;
|
|
365
|
+
return `<span class="badge badge-gray">${this.escapeHtml(type || 'memory')}</span>`;
|
|
400
366
|
}
|
|
401
367
|
|
|
402
368
|
sourceTypeBadge(type) {
|
|
@@ -408,26 +374,24 @@ export class KnowledgeView extends Component {
|
|
|
408
374
|
web: 'fa-globe',
|
|
409
375
|
s3: 'fa-cloud',
|
|
410
376
|
};
|
|
411
|
-
return `<span class="text-xs text-
|
|
377
|
+
return `<span class="text-xs text-muted"><i class="fas ${icons[type] || 'fa-question'} mr-1"></i>${type}</span>`;
|
|
412
378
|
}
|
|
413
379
|
|
|
414
380
|
statusBadge(store) {
|
|
415
|
-
if (store.isIndexing || store.status === 'indexing')
|
|
416
|
-
return '<span class="text-xs font-medium px-2 py-0.5 rounded bg-orange-900/50 text-orange-300 border border-orange-700/50">indexing</span>';
|
|
417
|
-
}
|
|
381
|
+
if (store.isIndexing || store.status === 'indexing') return '<span class="badge badge-outline-orange">indexing</span>';
|
|
418
382
|
const badges = {
|
|
419
|
-
indexed: '<span class="
|
|
420
|
-
error: '<span class="
|
|
421
|
-
not_indexed: '<span class="
|
|
383
|
+
indexed: '<span class="badge badge-outline-green">indexed</span>',
|
|
384
|
+
error: '<span class="badge badge-outline-red">error</span>',
|
|
385
|
+
not_indexed: '<span class="badge badge-gray">not indexed</span>',
|
|
422
386
|
};
|
|
423
387
|
return badges[store.status] || badges.not_indexed;
|
|
424
388
|
}
|
|
425
389
|
|
|
426
390
|
statCard(label, value, icon) {
|
|
427
391
|
return `
|
|
428
|
-
<div class="
|
|
429
|
-
<div class="text-
|
|
430
|
-
<div class="
|
|
392
|
+
<div class="stat-card">
|
|
393
|
+
<div class="text-muted text-xs mb-1"><i class="fas ${icon} mr-1"></i>${label}</div>
|
|
394
|
+
<div class="stat-value">${value ?? 0}</div>
|
|
431
395
|
</div>
|
|
432
396
|
`;
|
|
433
397
|
}
|
|
@@ -474,33 +438,33 @@ export class KnowledgeView extends Component {
|
|
|
474
438
|
}
|
|
475
439
|
|
|
476
440
|
escapeHtml(text) {
|
|
477
|
-
|
|
478
|
-
return String(text).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
441
|
+
return escapeHtml(text);
|
|
479
442
|
}
|
|
480
443
|
|
|
481
444
|
postRender() {
|
|
482
445
|
this.querySelector('#refreshListBtn')?.addEventListener('click', () => this.loadStores());
|
|
446
|
+
this.querySelector('#kbSidebarToggle')?.addEventListener('click', () => {
|
|
447
|
+
this.querySelector('#kbSidebar')?.classList.toggle('hidden');
|
|
448
|
+
});
|
|
483
449
|
}
|
|
484
450
|
|
|
485
451
|
template() {
|
|
486
452
|
return `
|
|
487
|
-
<div class="
|
|
488
|
-
|
|
489
|
-
|
|
453
|
+
<div class="kb-shell">
|
|
454
|
+
<button id="kbSidebarToggle" class="mobile-fab">
|
|
455
|
+
<i class="fas fa-list text-sm"></i>
|
|
456
|
+
</button>
|
|
457
|
+
<div id="kbSidebar" class="kb-sidebar">
|
|
490
458
|
<div class="flex items-center justify-between mb-3">
|
|
491
|
-
<h3 class="
|
|
492
|
-
<button id="refreshListBtn" class="
|
|
493
|
-
<i class="fas fa-sync-alt"></i>
|
|
494
|
-
</button>
|
|
459
|
+
<h3 class="section-title">Stores</h3>
|
|
460
|
+
<button id="refreshListBtn" class="btn-ghost text-xs"><i class="fas fa-sync-alt"></i></button>
|
|
495
461
|
</div>
|
|
496
462
|
<div id="knowledgeCards" class="space-y-2">
|
|
497
|
-
<div class="text-
|
|
463
|
+
<div class="text-muted italic text-center py-4 text-sm">Loading...</div>
|
|
498
464
|
</div>
|
|
499
465
|
</div>
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
<div class="flex-1 overflow-y-auto custom-scrollbar pl-2 border-l border-dark-border" id="knowledgeDetail">
|
|
503
|
-
<div class="text-gray-500 italic text-center py-16">Select a knowledge store to view details</div>
|
|
466
|
+
<div class="kb-detail" id="knowledgeDetail">
|
|
467
|
+
<div class="text-muted italic text-center py-4">Select a knowledge store to view details</div>
|
|
504
468
|
</div>
|
|
505
469
|
</div>
|
|
506
470
|
`;
|
|
@@ -27,9 +27,9 @@ export class LlmView extends Component {
|
|
|
27
27
|
if (selected) {
|
|
28
28
|
info.classList.remove('hidden');
|
|
29
29
|
info.innerHTML = `
|
|
30
|
-
<div class="grid grid-cols-
|
|
31
|
-
<div><span class="text-
|
|
32
|
-
<div><span class="text-
|
|
30
|
+
<div class="grid grid-cols-2 gap-4 text-sm">
|
|
31
|
+
<div><span class="text-secondary">Model:</span> <span class="text-primary ml-2">${selected.model}</span></div>
|
|
32
|
+
<div><span class="text-secondary">Base URL:</span> <span class="text-primary ml-2">${selected.baseUrl || 'Default'}</span></div>
|
|
33
33
|
</div>
|
|
34
34
|
`;
|
|
35
35
|
this.updateButtons(false);
|
|
@@ -78,11 +78,11 @@ export class LlmView extends Component {
|
|
|
78
78
|
}
|
|
79
79
|
} catch (e) {
|
|
80
80
|
outputEl.textContent = 'Error: ' + e.message;
|
|
81
|
-
outputEl.classList.add('text-red
|
|
81
|
+
outputEl.classList.add('text-red');
|
|
82
82
|
} finally {
|
|
83
83
|
this.isLoading = false;
|
|
84
84
|
this.updateButtons(false);
|
|
85
|
-
outputEl.classList.remove('text-red
|
|
85
|
+
outputEl.classList.remove('text-red');
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
|
|
@@ -93,31 +93,27 @@ export class LlmView extends Component {
|
|
|
93
93
|
|
|
94
94
|
template() {
|
|
95
95
|
return `
|
|
96
|
-
<div class="space-y-6 h-full overflow-y-auto pb-
|
|
96
|
+
<div class="space-y-6 h-full overflow-y-auto pb-6">
|
|
97
97
|
<div>
|
|
98
|
-
<label class="block text-sm font-medium text-
|
|
99
|
-
<select id="llmSelect" class="
|
|
98
|
+
<label class="block text-sm font-medium text-primary mb-2">Select LLM</label>
|
|
99
|
+
<select id="llmSelect" class="select"></select>
|
|
100
100
|
</div>
|
|
101
101
|
|
|
102
|
-
<div id="llmInfo" class="
|
|
102
|
+
<div id="llmInfo" class="panel-dim hidden"></div>
|
|
103
103
|
|
|
104
104
|
<div>
|
|
105
|
-
<label class="block text-sm font-medium text-
|
|
106
|
-
<textarea id="llmInput" rows="5" class="
|
|
105
|
+
<label class="block text-sm font-medium text-primary mb-2">Message</label>
|
|
106
|
+
<textarea id="llmInput" rows="5" class="textarea"></textarea>
|
|
107
107
|
</div>
|
|
108
108
|
|
|
109
109
|
<div class="flex gap-3">
|
|
110
|
-
<button id="runLlm" disabled class="
|
|
111
|
-
|
|
112
|
-
</button>
|
|
113
|
-
<button id="streamLlm" disabled class="bg-emerald-600 hover:bg-emerald-700 disabled:bg-gray-700 disabled:cursor-not-allowed text-white font-medium px-6 py-2.5 rounded-lg transition-colors">
|
|
114
|
-
Stream
|
|
115
|
-
</button>
|
|
110
|
+
<button id="runLlm" disabled class="btn btn-accent">Send Message</button>
|
|
111
|
+
<button id="streamLlm" disabled class="btn btn-accent">Stream</button>
|
|
116
112
|
</div>
|
|
117
113
|
|
|
118
114
|
<div>
|
|
119
|
-
<label class="block text-sm font-medium text-
|
|
120
|
-
<div id="llmOutput" class="
|
|
115
|
+
<label class="block text-sm font-medium text-primary mb-2">Output</label>
|
|
116
|
+
<div id="llmOutput" class="llm-output"></div>
|
|
121
117
|
</div>
|
|
122
118
|
</div>
|
|
123
119
|
`;
|