Skip to content

feat(chat): a product may declare no workspace connectors file - #286

Open
endrix wants to merge 1 commit into
mainfrom
feat/connectors-workspace-file-optional
Open

endrix wants to merge 1 commit into
mainfrom
feat/connectors-workspace-file-optional

Conversation

@endrix

@endrix endrix commented Dec 4, 2026

Copy link
Copy Markdown
Owner

What. AcpConnectorFiles.workspace is optional. Left out (or empty), the chat reads no connectors file of the folder it starts in:

  • loadAcpConnectors gives the known connectors and the user's file, whatever directory it is asked for;
  • watchAcpConnectorChoice watches the user's file alone;
  • a connector that is not known is said with the user's file only ("...; declare it in ~/.config/.../connectors.toml").

The resolver, the listing and the resume template follow from loadAcpConnectors. The test-only workspaceFile override stands for the declared file, so it is not read when none is declared.

Why. A product that opens files from anywhere, such as a viewer, has the chat's working folder at an opened file's own folder when the file lies outside the workspace's folders. The platform then reads the connectors file at that folder's project root last, and a [connectors.opencode] there replaces the built-in: an opened file's folder could choose the program the chat starts. Such a product needs to name the user's file alone. With workspace required, no value keeps that file out and leaves the "not known" sentence true.

What does not change. A declaration that names both files reads both, and the existing tests pass unchanged. No trust check, nothing new posted to the pages, no new dependency.

How it was checked. Six tests in acp-connectors.test.ts use a made project root whose file redefines opencode and declares one more connector. With no workspace file named: the built-in opencode, the other name not known, no workspace source in the listing, the built-in resume template, the user's file alone in the rejection, one watcher. The same root is read when the declaration names its file. With the previous acp-connectors.ts, five of the six fail. The package's typecheck, check:neutrality and the unit tests pass (extension-core 887 to 893). Not seen in a live VS Code.

For the reviewer to decide. DIALOGRAM_API_VERSION is not bumped: the member only became optional, so existing products are unaffected. The changelog entry is under [Unreleased], Added. Say if this should carry a version bump.

https://claude.ai/code/session_011UYzzTnHNcFEGtvi2Cq19P

AcpConnectorFiles.workspace is optional. Left out (or empty), the chat
reads no connectors file of the folder it starts in: the connectors are
the known ones on the PATH and the user's file, whatever directory
loadAcpConnectors is asked for. watchAcpConnectorChoice then watches
the user's file alone, and a connector that is not known is said with
the user's file alone.

Why: a product that opens files from anywhere, such as a viewer, has
the chat's working folder at an opened file's own folder when the file
lies outside the workspace's folders. The connectors file at that
folder's project root is read last, and a [connectors.opencode] there
replaces the built-in, so an opened file's folder could choose the
program the chat starts. With the member required, no value kept that
file out and left the "not known" sentence true.

A declaration that names both files reads both, as before; the
existing tests pass unchanged. The member only became optional, and
the API version is unchanged.

Checked by six new unit tests on a made project root (with the
previous acp-connectors.ts five of them fail), the package's
typecheck, the neutrality gate and the unit suite (extension-core 887
to 893 tests). Not seen in a live VS Code.

Claude-Session: https://claude.ai/code/session_011UYzzTnHNcFEGtvi2Cq19P
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant