8.1 KiB
8.1 KiB
Task: Connect shared Yuxi knowledge and personal knowledge uploads
Identity
- Task ID: 20261012-agent-knowledge-picker-b71e8a2c
- Mode: Feature
- Branch: codex/20261012-agent-knowledge-picker-b71e8a2c-agent-knowledge-picker
- Worktree: /Users/chillishark/Makelore 麦洛/.codex-worktrees/makelore/20261012-agent-knowledge-picker-b71e8a2c
- Base commit:
bcb1b61564 - Owner: codex
- Status: Ready for Integration
Scope
- Implement the now approved knowledge interaction: grouped multi-selection labeled exactly MakeLore知识 and 我的知识库, plus personal document upload/processing through existing APIs.
- Preserve explicit save/apply, shared read-only selection, own resource management and missing/unavailable selected IDs.
Intent And Constraints
- User first requested a proposal and stopped initial implementation. After discussion, the latest instruction explicitly authorizes modification and specifies the exact labels MakeLore知识 and 我的知识库 with multiple selection. Screenshot is evidence of native global-read sharing, not authorization to change platform permissions.
- Concurrent and Planning Gates Passed: matching task/worktree reservation verified at the completed current trial base bcb1b615; entry/memory, own record, positioning/current snapshot, decisions/system/domain/success, relevant knowledge evidence and commitments loaded; peer Scope/Intent/Promotion sections assessed.
- Main owns credentials and file IO; Yuxi remains authority for readable/selectable resources and mutations. Shared read-only libraries must not expose upload/replace/process/delete controls. Selection only changes the draft until explicitly saved/applied.
- Preserve completed card size, avatar, configuration, chat/composer and thinking changes. Active 20261012-agent-chat-files-review-e87b41c6 owns separate chat attachment UI; isolate files and retain its eventual integration. Historical undefined child-skill scope has no concrete dependency.
- Do not steal desktop focus, open native file pickers in verification, mutate live cloud knowledge, send paid model requests, deploy, push or edit peer/canonical documents. Background temporary-app rollout must use a current source comparison and preserve profile/latest compatible peer changes.
- The earlier premature experiments were fully reverted before design discussion. This same-task implementation resume passed ownership/context gates with all peer records rechecked; current temporary Renderer now includes the peer chat-files implementation, which is read-only and must be retained on future integration.
- Plan: implement grouped dropdown/selected list and personal upload affordance using catalog-to-owned-list ID joins; exercise meaningful draft, permission, retry and layout regressions; typecheck, build and independently review; record verified source handoff. Current request changes code; no automatic cloud or runtime update is necessary.
Outcome
- Implemented the approved knowledge interaction in advanced configuration: dropdown groups labeled exactly MakeLore知识 and 我的知识库, multiple selections with individual removal and the existing 100-library limit. Selection remains draft-only until explicit save/apply; no Skill/tool/preload selections are added.
- Readable/usable facade catalog IDs are joined with the server's creator-owned management list. MakeLore知识 exposes only name/description and read-only binding. Shared libraries never appear in the personal manager or mount document mutators. No backend DTO, permission or cloud contract changed.
- 上传自己的文件 expands the existing owned library create/select and document workflow. Uploads automatically parse/index and display server-derived readiness; retries preserve operation IDs and existing usable contents. Owned libraries that are absent from the usable catalog remain manageable without silently adding invalid bindings; existing unavailable bindings stay visible and removable.
- Async create/delete completion uses the latest configuration callbacks, preserving interleaved model and knowledge changes. Confirmed creation can finish during an unrelated save. Unconfirmed upload/process/import requests remain scoped to their library through refresh/error and retry-picker cancellation, preserve leave protection, and prevent unrelated switch/delete/replace. A successful ownership-list omission disables/hides the scoped manager until explicit discard; temporary loading/read errors allow an already-authorized upload to finish automatic processing exactly once.
- Existing personal Makelore execution derives retrieval tools from selected authorized knowledge. The Yuxi source-contract review confirmed this flow needs no knowledge-base Skill selection or new cloud patch. Native Yuxi web configuration has a separate Skill requirement. Review evidence is in task 20261012-knowledge-api-review-c82e607a (commit a0334f9); no backend product code was changed.
- README now documents selection, personal upload, availability and retry semantics. Product changes are limited to four Renderer files; focused and adjacent tests cover the new flow. No primary-checkout merge, push, live cloud mutation or temporary-app rollout was performed.
Verification
- Used the repository-pinned pnpm 10.33.4. Final typecheck, scoped ESLint (zero errors/warnings), git diff --check and build:vite passed. Renderer, Main, preload and utility build outputs succeeded; existing mixed-import/chunk-size/Browserslist warnings remain outside this change.
- Final unit verification: 62/62 across cloud-agents-page, cloud-knowledge-picker, cloud-knowledge-catalog and cloud-knowledge-status. Covers grouping, multiple selection/removal, draft persistence, shared non-mutation, owned catalog failure/recovery, missing IDs, selection limit, create/delete races, current model preservation, upload/process retry identity, retry cancellation, lost ownership, delayed upload through refresh/error, temporary parent disable and unusable-owned management.
- Headless Chrome verified all 14 focused/adjacent browser scenarios. The final combined run passed all five knowledge scenarios and seven layout/avatar scenarios; two card-return cases initially used an outdated chat-button label. Updated that test-only locator to the current 返回智能体列表 label, then reran both cases successfully (2/2, 5.7 s). Knowledge tests verified 375px/1440px multi-selection and removal through explicit save/reopen, personal create/upload/automatic processing to indexed six-chunk readiness, and cancelled/failed upload retaining bindings, unsaved input and operation identity. Adjacent layout/card/avatar cases verify 375px/768px/1024px/1366px/1440px as appropriate.
- Independently reviewed final Renderer code and 31 focused unit cases: PASS, with all scoped findings resolved. Visually inspected background screenshots of desktop selection and narrow-window ready documents; no horizontal overflow or control clipping. Tests use existing wire formats and IPC fixtures, not real cloud uploads or paid model calls.
- All verification stayed headless/background. No Electron/native picker was launched, desktop app activated, running temporary process stopped, cloud deployed, or external message sent. Source-only feature is ready for integration; no claim of live cloud acceptance or temporary-app update.
Follow-ups
- A later authorized temporary-app rollout must apply this knowledge-only change over the current source and preserve the latest compatible peer chat-files/UI changes, user profile and focus behavior. The current trial uses the separate 20261012-agent-chat-files-review-e87b41c6 Renderer source; do not replace it wholesale with this earlier base.
- MakeLore知识 shows only libraries already authorized/readable/usable for the signed-in account. Platform library sharing and enabled embedding setup remain existing administrator prerequisites, not changes made by this task.
Promotion Candidates
- Promote the approved grouped multi-selection, shared read-only versus owned-management semantics, unavailable-binding retention and personal upload/retry flow into canonical Agent configuration/knowledge documentation during integration. Feature mode intentionally leaves canonical and peer task records unchanged.