Repository navigation
Support # document references in the plan editor's Ask AI #1556
Copy link
Copy link
Open
Labels
P1Priority 1: urgent, address before P2 workPriority 1: urgent, address before P2 workenhancementNew feature or requestNew feature or request
Description
Summary
Part of #1543 (Track A2). Let users # reference documents and tags in the orchestration plan editor's Ask AI, so a revised plan can use them. The same server authorizer serves the workflow assistant in Phase 3.
User Value
When revising a plan, users often want to say "also check this against #policy-doc". Today they have to leave the editor and start over. The normal composer's # picker already works well, so the plan editor should offer the same thing.
Proposed Behavior
- Picker: reuse the normal composer's
#picker (searchContextCandidates()inlib/contextMentions.ts:208-275,DocumentPickerPopover,ContextChips, and keyboard navigation inComposerEditor.tsx:429-480) through A1's restrictedComposerEditormode. - Server: factor a scope-only reference authorizer out of
resolve_elicitation_references(functions_orchestration_context.py:346), which today requires an owned conversation. Surfaces without a conversation, such as the workflow editor, accept only personal, group and public documents and tags, never chat attachments. The elicitation path stays exactly as it is. - Plan editor:
#references in Ask AI flow into the plan's seeds throughmerge_elicitation_context, which is already used for editor-scoped questions (functions_orchestration_plan_editing.py:354-372). - Not planned: the diagram, chart and image editors edit an artifact, so they don't get
#references.
Acceptance Criteria
- A user can
#a document in the plan editor's Ask AI, and the revised plan uses it. - Unauthorized or stale references are rejected with a clear message.
- The orchestration question card behaves exactly as before.
- Functional tests for the scope-only authorizer (including rejection of chat attachments), Playwright coverage of the plan editor picker, release notes and
config.pyversion.
Notes
- Roadmap: §6, Track A, A2. Related gotchas in §8: 22 (
ComposerEditoris shared), 23 (reference authorization outside a conversation), 24 (group or public documents bound into a personal workflow). - Open decision (§9), with the recommendation: a "search all my documents" toggle in the plan editor is a later option, not part of A2.
- Depends on: A1 (Show AI-assist messages immediately, with Cancel and Retry, in a shared assist thread #1552). Phase 3 (Add an AI workflow assistant to the V2 workflow editor #1548) depends on this.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P1Priority 1: urgent, address before P2 workPriority 1: urgent, address before P2 workenhancementNew feature or requestNew feature or request
Type
Projects
- StatusShow more project fieldsIn review
Activity
Record roadmap tracking issues (Phase 0 done)
Pin question-card reference authorization with a golden fixture
Add Playwright coverage for plan editor document references
Document plan editor document and tag references
Renumber A1 to 0.261.200 and A2 to 0.261.201 after N2 took 0.261.199