mirror of
https://github.com/lobehub/lobehub
synced 2026-04-21 17:47:27 +00:00
* ♻️ refactor: adopt Notebook list + EditorCanvas for agent documents The agent working sidebar previously used a FileTree directory view and a hand-rolled Markdown+TextArea editor with manual save. Agent documents already back onto the canonical `documents` table via an FK, so they can reuse the exact same rendering surface as Notebook. - AgentDocumentsGroup: replace FileTree with a flat card list styled after Portal/Notebook/DocumentItem (icon + title + description + delete). - AgentDocumentEditorPanel: drop the bespoke draft/save/segmented view logic; mount the shared <EditorCanvas documentId={doc.documentId} sourceType="notebook" /> inside an EditorProvider so auto-save and rich editing are handled by useDocumentStore. * ✨ feat: promote agent documents as the primary workspace panel - Replace the agent-document sidebar with a Notebook-style list: pill filter (All/Docs/Web), per-item createdAt, globe icon for sourceType=web. - Add a stable panel header "Resources" with a close button (small size, consistent with other chat header actions); no border divider. - Wire clicks to the shared Portal Document view via openDocument(), retiring the inline AgentDocumentEditorPanel. - Portal/Document/Header now resolves title directly from documentId via documentService.getDocumentById + a skeleton loading state. - Portal top-right close icon switched to `X`. - Layout: move AgentWorkingSidebar to the rightmost position; auto-collapse the left navigation sidebar while Portal is open (PortalAutoCollapse). - Header: remove dead NotebookButton, drop the Notebook menu item; add a WorkingPanelToggle visible only when the working panel is collapsed. - ProgressSection hides itself when the topic has no GTD todos. - Builtin tool list removes Notebook; migrate CreateDocument Render and Streaming renderers to builtin-tool-agent-documents (notebook package kept for legacy rendering of historical tool calls). - agent_documents list UI now reads from a separate SWR key (documentsList) so the agent-store context mapping doesn't strip documentId/sourceType/createdAt from the UI payload. - i18n: add workingPanel.resources.filter.{all,documents,web}, viewMode.{list,tree}, and the expanded empty-state copy; zh-CN translations seeded for preview. - New local-testing reference: agent-browser-login (inject better-auth cookie for authenticated agent-browser sessions). * update * 🐛 fix: satisfy tsc strict i18next keys, remove duplicate getDocumentById, coerce showLeftPanel * ♻️ refactor: graduate agent working panel out of labs
26 lines
616 B
JSON
26 lines
616 B
JSON
{
|
|
"name": "@lobechat/builtin-tool-agent-documents",
|
|
"version": "1.0.0",
|
|
"private": true,
|
|
"exports": {
|
|
".": "./src/index.ts",
|
|
"./client": "./src/client/index.ts",
|
|
"./executor": "./src/executor/index.ts",
|
|
"./executionRuntime": "./src/ExecutionRuntime/index.ts"
|
|
},
|
|
"main": "./src/index.ts",
|
|
"dependencies": {
|
|
"@lobechat/markdown-patch": "workspace:*"
|
|
},
|
|
"devDependencies": {
|
|
"@lobechat/types": "workspace:*"
|
|
},
|
|
"peerDependencies": {
|
|
"@lobehub/ui": "^5",
|
|
"antd": "^6",
|
|
"antd-style": "*",
|
|
"lucide-react": "*",
|
|
"react": "*",
|
|
"react-i18next": "*"
|
|
}
|
|
}
|