Repository navigation
feat(daemon): expose list_files and expand @path over AG-UI - #1717
Merged
Merged
Conversation
A daemon client can now list the project's files for its @ menu and send @<path> references like the chat TUI. The expansion moved into agent/domain so the TUI and the serve worker share one implementation.
This was referenced Nov 6, 2026
Closed
edenreich
added a commit
that referenced
this pull request
Nov 6, 2026
…as (#1723) ## Summary The `e2e` job has failed on `main` since #1717, and every PR opened after it inherits the failure. `TestChatDaemonTeleportsTheSessionAndBringsItBack` sends `say hello @README.md` in a session teleported to workspace `b` and asserts the README's text never shows, as its guard that a remote session does not read this machine's file. #1717 made the serve worker expand `@<path>` itself. The worker on `b` now inlines the README of its own clone, which carries the same text as the local one, so the guard fired on a file the remote session is entitled to read. ## Changes - The test now references `local.md`, a file written only into the local checkout. The remote worker cannot resolve it, so the token stays raw and the file's text must not show. That is the guard's original intent, and it can now tell the two machines apart. - The file is removed again before the session teleports back, since a changed checkout refuses the return. No product code changes. Worker-side expansion of a file the worker has is the behavior #1714 asked for. ## Verification - Reproduced the failure on `main` locally, then `task test:e2e` equivalent with `-race` passes: `ok tests/e2e 166s`. ## Downstream - no docs ticket: test-only fix
Contributor
|
🎉 This PR is included in version 0.246.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This was referenced Nov 7, 2026
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.
Resolves #1714
Summary
A daemon client of the
infer daemonAG-UI binding can now show the@file autocomplete and send file references like the chat TUI: a new project-scopedlist_filesframe answers with the project's files, and the serve worker expands@<path>tokens inrun_agent_inputuser messages before the run. The expansion moved intointernal/agent/domainso the TUI and the worker share one implementation.Changes
list_filespanel frame andfilesreply ininternal/presentation/headless/panel.go, backed byagentdomain.FileService.ListProjectFiles. It answers with an empty list when the service is nil or the walk fails, and rides the existingframeWriter, so it carries the lowercase app-frametype.internal/container/container.gowires the worker's file service into the panel.internal/sessions/registry.goaddslist_filesto the project-scoped request vocabulary and routes thefilesreply to the requester only.@<path>expansion extracted toagent/domain.ExpandFileReferencesandagent/domain.MarkdownSummary. The chat TUI'sexpandFileReferencesandExtractMarkdownSummarynow delegate.headlessControltakes areferencesvalue holding the file, image, model and issue services. Itsexpandapplies the file expansion and then the existing#Nexpansion to each run input's text, in the TUI's order.## Summarysection when it has one, images replaced by a path note, invalid references left in place.docs/browser-extension-protocol.mdgains a Project files section and the run-input bullet, anddocs/ag-ui-output.mddocuments the worker-side expansion.filesreply reaches only its requester, and a worker test that a valid@reference is inlined while an invalid one stays raw. The existing TUI suite now runs through the shared function.Notes for review
infer headlesskeeps its own@and--fileshandling (whole file inlined,--filesfails on an invalid path). Moving it to the shared function would change what existing invocations send, so it is left out here.~paths. The sandbox path policy is not consulted. Restricting the worker to the pathslist_filesoffers is a possible follow-up.Downstream
list_filesfor their@menus. The frame is additive and both ignore unknown frame types, so no coordinated release is needed./gap stays tracked in [FEATURE] Expose slash shortcut completion over the daemon binding #1715.inference-gateway/docsis not filed yet.