- Updated login.vue to use AuthShell component, enhancing layout and accessibility.
- Removed GitHub login functionality and streamlined Gitea login process.
- Improved form field structure and styling for username, password, and captcha inputs.
- Added loading states for login button and improved user feedback.
- Updated register.vue to utilize AuthShell, enhancing user experience during registration.
- Improved form validation and structure for username, password, confirmation, and captcha inputs.
- Added Google registration option and updated social login buttons.
- Removed unnecessary background decorations for a cleaner design.
- Updated database schema in db.sqlite.
- Updated chat API to accept an array of content parts (text and images) in addition to plain text.
- Modified content validation to ensure at least one part is provided.
- Enhanced message processing to handle image data and convert it to a suitable format for the chat engine.
- Added utility functions for extracting text from parts and normalizing content input.
- Updated model response to include the type of model used.
- Improved error handling in the chat engine stream response.
getEnabledToolInfos now accepts userId and filters by agentPublicToolSlugs
for unauthenticated users, so document and other non-public tools no longer
show as chips above the input box for guests.
Co-authored-by: CodeFree <codefree@chinatelcom.cn>
- TopNav: '文档' link only shows when loggedIn
- AgentToolbar: document button v-if="loggedIn"
- getAgentToolsForChatByAgentId: filter tools by agentPublicToolSlugs
whitelist for guest users (previously only skipped adminOnly tools,
exposing document and other non-public tools to unauthenticated users)
Co-authored-by: CodeFree <codefree@chinatelcom.cn>
LLM was still calling document read/list despite memory being in context.
Use explicit prohibition: '禁止调用 document 工具的 read 或 list 操作来读取这些记忆'
and clarify that memory is always current, only use tool for create/modify.
Co-authored-by: CodeFree <codefree@chinatelcom.cn>
Memory context is already injected into system prompt, so add explicit
instruction telling the LLM to use it directly instead of calling the
document tool to re-read memories.
Co-authored-by: CodeFree <codefree@chinatelcom.cn>
- AgentDocumentDrawer: delete button in list cards and detail view header
with confirm dialog, auto-refresh list after delete
- Drawer now re-fetches on every open (not just first time)
- agent-document service: add getMemoryContext(userId) — queries all
memory-type docs, wraps in <memory> tag
- chat-engine: inject memory context into systemPrompt for logged-in users
Co-authored-by: CodeFree <codefree@chinatelcom.cn>
- Service layer: map rows with deserializeTags to return string[] not JSON string
- Frontend: add null guard on item.tags.length to prevent render crash when tags is null
Co-authored-by: CodeFree <codefree@chinatelcom.cn>
drizzle timestamp_ms mode returns Date objects, but AI SDK Zod schema
validation rejects Date in tool-result output.value (expects string).
Add toISO() helper to convert all createdAt/updatedAt fields to ISO
string format before returning from document executor.
Co-authored-by: CodeFree <codefree@chinatelcom.cn>
- AgentSidebar: add '文档' link in footer-links (desktop + mobile)
- AgentToolbar: add file-text icon button linking to /agent-documents
- Users can now access documents directly from the chat interface
Co-authored-by: CodeFree <codefree@chinatelcom.cn>
When a tool-call is in 'approval-responded' state with approved=true but
hasResult=false (approval executed but result not yet available in
approvalToolResults), the code was pushing a tool-call part to the
assistant message without a corresponding tool-result in the tool message.
This caused providers (e.g. deepseek) to reject the prompt with
'Tool result is missing for tool call' or
'Invalid prompt: The messages do not match the ModelMessage[] schema'.
Fix: only push tool-approval-request (not tool-call) when hasResult=false.
Also clean up approval-requested branch to only include required fields
(type, approvalId, toolCallId) per AI SDK schema.
Co-authored-by: CodeFree <codefree@chinatelcom.cn>
- GET /api/agent-documents: list documents with type/keyword/pagination filters
- GET /api/agent-documents/🆔 get document detail with content
- PATCH /api/agent-documents/🆔 update document title/content/tags
- DELETE /api/agent-documents/🆔 delete document
- All endpoints require authentication and enforce user-level isolation
Co-authored-by: CodeFree <codefree@chinatelcom.cn>
- Implemented color tool with operations for conversion, random color generation, color info, mixing, and contrast detection.
- Added dice tool supporting rolling dice, coin flipping, item picking, and rock-paper-scissors.
- Introduced hashing tool for computing and comparing hash values using various algorithms.
- Created magic 8-ball tool for answering yes/no questions and providing daily fortunes.
- Defined configuration schemas and input validation for each tool using Zod.
- Registered new tools in the agent tool registry with appropriate default configurations and input schemas.
- Remove ChatWidget component from app.vue
- Update index.vue to ensure flex layout accommodates new design
- Add systemPrompt field to agentSessions table in the database
- Modify createSession and updateSession services to support systemPrompt
- Enhance API endpoints to accept and update systemPrompt
- Adjust chat engine to prioritize session-level systemPrompt over agent default
- Extend AgentSessionItem interface to include systemPrompt
- Revamp AgentSystemPromptModal to allow editing of systemPrompt
- Integrate editable system prompt functionality in AgentToolbar and chat page
- Add E2E tests for session-level system prompt functionality
- Update design document to reflect new system prompt capabilities