feat(web): add composer file-reference picker#85
Merged
Conversation
Move the tiered scoring functions into composer/match.ts so the slash palette and future pickers share one ranker. No behavior change; the provenance record now covers both files.
Type @ in the composer to open a ranked list of session files. Accept a directory to see its children; accept a file to insert its path into the draft. Accepted references render as chips derived from the draft text, so the text stays the only state and removal edits the text directly. The picker reads the session file index, loads directories on demand through a new requestDir action, and closes under the same disabled rules as the slash menu.
# Conflicts: # apps/web/src/features/transcript/SessionMain.tsx
Collaborator
|
Made a few more quick changes:
|
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.
What this changes
@file-reference picker to the composer. Type@to open a ranked list of the session's files.slash.tsintomatch.ts, so the slash menu and the picker share one ranker.Implements the file/path-references row of FEATURE_MATRIX §4 (text insertion plus chips; reorder is not included).
Verification
pnpm checkpasses: release contract, provenance, lint, typecheck. The provenance record for the extracted scorer now coversslash.tsandmatch.ts.pnpm --filter @t4-code/web testpasses: 74 files, 1099 tests. The 20 new tests cover the trigger rules, listing flattening, ranking order, insert spans, and chip tokens.@opens the menu; ranking puts basename matches first; a directory accept loads its children and keeps the menu open; typed paths load directories on demand; a file accept inserts the path and shows a chip; chip removal edits the draft; Escape closes the menu.Checklist
pnpm checkpasses (release contract, provenance, lint, typecheck)pnpm testpasses; new behavior has a test that fails without this change (ran the@t4-code/websuite; the knownpackages/clienttranscript-retention failure on main is unrelated)THIRD_PARTY_NOTICES.md