Conversation
Signed-off-by: share121 <me@s121.top>
OpenCode v2 resolves plugin-directory entrypoints from the root index.ts/js/mjs file and does not read package.json exports, so a local checkout configured via plugins was silently skipped. Re-export the built entrypoint from the repository root so the directory loads.
OpenCode v2 no longer emits the deprecated session.idle event, nor an idle session.status, so the V1 idle handler that drives auto-capture and user-profile learning never fired. Map a finished session execution (succeeded/failed/interrupted) back to session.idle so the existing idle pipeline runs again.
2 of 4 tasks
Collaborator
|
Thanks @share121 — the embedding-strip approach here was correct and fixed a real truncation problem. Closing in favor of #343, which rebases the core change onto current
Credit for the original fix remains with you. |
Collaborator
|
Superseded by #343 (clean rebase + remaining API leak paths). |
EyJunge1
added a commit
that referenced
this pull request
Oct 1, 2026
Keep centroid/anchor for internal similarity and pending cleanup apply, but omit them from memory-tool profile reads and profile API payloads so responses stay small enough for the model and UI. Based on work by share121 in #304.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Each profile item persists two 768-dimension embeddings (
centroidandanchor) that are only used internally for similarity, dedup and drift detection. Both thememorytool'sprofilemode andGET /api/user-profileserialized the rawprofileData, so they shipped those vectors to callers. A populated profile (18 items: 8 preferences + 8 patterns + 2 workflows) serialized to ~591 KB, which exceeded the tool-output limit and got truncated — theprofileresult was unusable and burned model context (observed as a truncated ~594 KB tool response).This change strips
centroid/anchorfrom serialized profile data. The vectors are still stored and used internally; they are only removed from what leaves the process.Changes
src/services/user-profile/profile-utils.ts: addstripProfileEmbeddings(data)that deletescentroid/anchorfrom every item inpreferences/patterns/workflows.src/index.ts: apply it to theprofileread branch of thememorytool.src/services/api-handlers.ts(handleGetUserProfile): apply it to the API response that feeds the Web UI.tests/profile-utils.test.ts: cover stripping across all three item types plus missing/malformed sections.Testing
bun test tests/profile-utils.test.ts— 2 passbunx tsc(build) — cleanbun test— 465 pass / 2 fail; both failures are Windows-environment only and unrelated to this change:tests/onnxruntime-resolve.test.ts—EPERMcreating a symlinktests/turso-legacy-migrator.test.ts—EBUSYunlinking a locked db filebunx prettier --checkon the changed files — cleanGET /api/user-profilereturns 4,812 bytes with nocentroid; memory search still returns the expected results.Notes