Files
makelore/.project-docs/30-worklog/tasks/20260914-yuxi-embedding-ml-a174ed62.md
T

52 lines
5.1 KiB
Markdown

# Task: 知识库向量配置改由Yuxi维护
## Identity
- Task ID: 20260914-yuxi-embedding-ml-a174ed62
- Mode: Feature
- Branch: codex/20260914-yuxi-embedding-ml-a174ed62-yuxi-embedding
- Worktree: D:\Datas\OthersProjects\.codex-worktrees\makelore\20260914-yuxi-embedding-ml-a174ed62
- Base commit: f92753329c511d60f61c156172fdf81eab2790d5
- Owner: codex
- Status: Ready for Integration
## Scope
- Update the MakeLore cloud Agent knowledge-base empty state and README configuration guidance so Yuxi is the sole embedding-model owner.
- Keep the existing `knowledge` Host API response shape (`databases` plus embedding models with `id`, `name`, and `dimension`) and make the client state use that shared contract.
- Verify that the client has no embedding-specific dependency on the Works Square or one-api model catalogs; do not change chat-model routing, account, billing, or server behavior.
## Intent And Constraints
- Concurrent Task Gate passed through the official project-docs check/start/status flow. This feature worktree is isolated from the MakeLore main checkout and other active tasks; the UX integration base is already present at the recorded base commit.
- The user decided that Yuxi maintains embedding providers, endpoint/API key, enabled embedding models, and dimensions. one-api does not configure embeddings; Works Square remains the creator Token Point ledger only.
- The user subsequently clarified that embedding vectorization is paid by the platform: it must not enter user usage, Token Point deductions, or Agent ceilings. Knowledge processing that triggers dialogue-model calls remains subject to the original model billing rules.
- The client should tell administrators to configure the provider and model in Yuxi, then refresh the knowledge/model directory. Remove the old Works Square activation, one-api vector-interface, and cross-end model-ID matching instructions.
- Scope is limited to the client knowledge configuration copy, shared client typing where needed to retain `dimension`, focused test fixtures/assertions, and synchronized README wording. No Yuxi, Works Square, AgentBus, authentication, payment, installation, or deployment changes.
## Outcome
- The knowledge panel and README now describe Yuxi-owned embedding configuration. The old Works Square activation, one-api vector-interface, and cross-end model-ID matching instructions were removed. The client catalog state now uses the shared model contract, including `dimension`; no embedding-specific Works/one-api filtering was present or added.
- This continuation updates the knowledge upload/indexing explanation, the empty-model guidance, the cost-ceiling explanation, and the cost-source label so platform-funded embedding is separated from billable dialogue-model calls.
- The final wording correction removes the unsupported billable OCR implication: knowledge processing is described as billing only dialogue-model calls under the original rules, while embedding remains platform-funded and outside user usage, Token Points, and Agent ceilings.
## Verification
- `pnpm install --frozen-lockfile --offline` completed with the pinned `pnpm@10.33.4`; the install did not change manifests or the lockfile.
- `pnpm exec vitest run tests/unit/cloud-knowledge-catalog.test.tsx --maxWorkers=1` passed 5/5 tests.
- `pnpm run typecheck` passed; scoped ESLint for the changed client and test files passed; `git diff --check` passed.
- `pnpm run build:vite` passed Renderer, Main, Preload, and utility targets with the repository's existing Browserslist, chunk-size, and mixed-import warnings.
- `pnpm exec playwright test tests/e2e/cloud-agents.spec.ts` passed 1/1 scenario, including the updated Yuxi-only empty-catalog guidance.
- Follow-up correction verification: the focused knowledge/workflows unit run passed 22/22; the rebuilt Vite bundle passed; the cloud-agent Electron E2E passed 1/1 with the platform-funded embedding and billable dialogue-model assertions; typecheck and scoped ESLint passed (one existing CloudCosts hooks warning remains).
- The replacement fresh independent Reviewer completed the shared three-service review with Standards PASS and Spec PASS. The MakeLore client, README, and focused test changes had no blocking findings and require no further product changes; the review record is `D:\\Datas\\OthersProjects\\.codex-worktrees\\makelore\\20260915-embedding-final-review-ml-c58f10\\.project-docs\\30-worklog\\tasks\\20260915-embedding-final-review-ml-c58f10.md`.
- The user authorized this batch to be committed and merged into the repository main branch. The integration task and main checkout remain owned by the parent agent; this feature task only hands off the reviewed source commit.
- No live Yuxi/Works request, production configuration, packaging, deployment, or remote push was performed.
## Follow-ups
- Integration must include the resulting source commit, and a rebuilt client is required before users see the updated guidance.
## Promotion Candidates
- The README and in-product empty-state wording are the product-facing record of the accepted Yuxi embedding ownership decision; no separate canonical ADR or architecture change is proposed by this feature task.