Commit Graph

5 Commits

Author SHA1 Message Date
51b89309e6 fix: parse text-based tool calls for models without native function calling
Models like ministral output tool calls as plain text (e.g., tool_name[ARGS]{json})
instead of using Ollama's native tool_calls format. This adds a parser that:

- Detects text-based tool call patterns in model output
- Converts them to OllamaToolCall format for execution
- Cleans the raw tool call text from the message
- Shows proper ToolCallDisplay UI with styled output

Supports three formats:
- tool_name[ARGS]{json}
- <tool_call>{"name": "...", "arguments": {...}}</tool_call>
- {"tool_calls": [...]} JSON blobs
2026-01-07 12:41:40 +01:00
862f47c46e feat(tools): enhanced custom tool creation with CodeMirror, Python support, and testing
Some checks failed
Create Release / release (push) Has been cancelled
- Add CodeMirror editor with syntax highlighting for JavaScript and Python
- Add 8 starter templates (4 JS, 4 Python) for common tool patterns
- Add inline documentation panel with language-specific guidance
- Add tool testing UI to run tools with sample inputs before saving
- Add Python tool execution via backend API with 30s timeout
- Add POST /api/v1/tools/execute endpoint for backend tool execution
- Update Dockerfile to include Python 3 for tool execution
- Bump version to 0.4.0
2026-01-02 20:15:40 +01:00
940abb18e8 fix: improve tool descriptions and enable recursive tool calling
- Simplify and clarify all tool descriptions for better model understanding
- Enable recursive tool calling - model can now chain multiple tools
- Pass tools on follow-up calls so model can call more tools after seeing results
- Update tool result message to encourage calling additional tools if needed
- Include suggestion in error messages so model knows what to do on failure
- Fix StreamingIndicator visibility with explicit colors

🤖 Generated with [Claude Code](https://claude.ai/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 20:08:37 +01:00
6013191376 feat: add system prompts, custom tools, theme toggle, and tool display
Major features implemented:
- System prompt management (/prompts route)
  - Create, edit, delete prompt templates
  - Set default and active prompts
  - Prompts stored in IndexedDB (v3 migration)
  - Injected into chat as system messages

- Custom tool creation (ToolEditor)
  - Create tools with JavaScript or HTTP implementations
  - Execute user-defined tools during chat
  - Tool call display in messages (ToolCallDisplay.svelte)

- Theme toggle
  - Light/dark mode switch in Settings
  - Theme persistence to localStorage
  - Flash prevention on page load

- Bug fixes
  - Disable USE_FUNCTION_MODEL (was routing all to functiongemma)
  - Add ready() promise to prompts store for async loading
  - Fix ToolEditor syntax error (extra script tag)

Files created:
- src/lib/storage/prompts.ts
- src/lib/stores/prompts.svelte.ts
- src/routes/prompts/+page.svelte
- src/lib/components/tools/ToolEditor.svelte
- src/lib/components/chat/ToolCallDisplay.svelte

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 19:31:15 +01:00
de835b7af7 feat: initial commit - Ollama WebUI with tools, sync, and backend
Complete Ollama Web UI implementation featuring:

Frontend (SvelteKit + Svelte 5 + Tailwind CSS + Skeleton UI):
- Chat interface with streaming responses and markdown rendering
- Message tree with branching support (edit creates branches)
- Vision model support with image upload/paste
- Code syntax highlighting with Shiki
- Built-in tools: get_current_time, calculate, fetch_url
- Function model middleware (functiongemma) for tool routing
- IndexedDB storage with Dexie.js
- Context window tracking with token estimation
- Knowledge base with embeddings (RAG support)
- Keyboard shortcuts and responsive design
- Export conversations as Markdown/JSON

Backend (Go + Gin + SQLite):
- RESTful API for conversations and messages
- SQLite persistence with branching message tree
- Sync endpoints for IndexedDB ↔ SQLite synchronization
- URL proxy endpoint for CORS-bypassed web fetching
- Health check endpoint
- Docker support with host network mode

Infrastructure:
- Docker Compose for development and production
- Vite proxy configuration for Ollama and backend APIs
- Hot reload development setup

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 08:11:33 +01:00