Repository navigation
Conversation
… the chat tool Phase 4c of the declutter plan. DiagramClientBehavior (with AcpConnectorInfo), DiagramCommandIds and InProcessChatTool were each declared by hand in two or three packages: the API, the toolkit (as SidecarClientBehavior, SidecarProfileCommandIds, RegistryChatTool) and the webview, with a test to keep two of the twins in step. They live in @dialogram/shared now, the API re-exports them, the toolkit's names are the shared types (ProductClientBehavior is the shared behaviour minus the four fields the platform derives), and the webview reads them. The twin test goes with the second twin. scriptInterpreterCommands is deprecated: nothing reads it. Claude-Session: https://claude.ai/code/session_01EToj6RJRMSSHQiqGNMU9wv
The server's MCP bridge used a third hand-written copy of the chat tool; PlatformMcpTool is the shared type, read-only. DiagramOperationKinds moves to shared beside the command ids, so the webview stops keeping its own. The stale twin doc above RegistryChatTool, a doc link to a type the shared package cannot see, the deprecated flag's assertions in the webview's flag test, and the odd indentation in chat-tools.ts are gone. Claude-Session: https://claude.ai/code/session_01EToj6RJRMSSHQiqGNMU9wv
The extension build runs with unused locals forbidden; AcpConnectorInfo is re-exported, not used, so it is no longer imported. Claude-Session: https://claude.ai/code/session_01EToj6RJRMSSHQiqGNMU9wv
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.
Phase 4c of the declutter plan: the hand-kept type twins. Stacked on #120 (it edits the same
DiagramCommandIdsblock that PR deprecates three ids in); the base moves tomainonce #120 lands. No product repo changes; every product's profile compiles unchanged.What was duplicated
DiagramClientBehavior+AcpConnectorInfoextension-core/api.ts,sidecar-toolkit(SidecarClientBehavior, minus the four derived fields),diagram-client/profile.ts(its own, already missingenvon the connector)@dialogram/shared/client-behavior.ts, with the API's docs;ProductClientBehavioris the shared type minuschatBackend,acpConnectors,resumeAtStep,statusSourceDiagramCommandIdsapi.ts, toolkitSidecarProfileCommandIds(20 identical keys + 2), client (6 keys)@dialogram/shared/command-ids.ts; the toolkit'sextendsit withsidecarEdit/sidecarSend; the client typescommandIdsasPartial<DiagramCommandIds>and names the six it runs itselfInProcessChatToolapi.ts, toolkitRegistryChatTool@dialogram/shared/chat-tools.ts;RegistryChatToolis an aliasThe API re-exports all four from
@dialogram/shared, so every extension-core consumer andextension-core/src/index.tskeep their imports.client-behavior-twin.test.ts, which compared two declarations as source text, is deleted with the second declaration; its note on why the four derived fields are not product-facing lives on as the doc ofProductClientBehavior.Kept: the toolkit's
RunHost.useLiveOverlaySignatureSourceargument (it namesvscode.Uri, which shared cannot), andDiagramLiveOverlaySourcein the API.scriptInterpreterCommandshas no reader (node families decide the icon); deprecated, not removed, since two products still set it.What the review made of it
No correctness findings. Cleanups taken:
PlatformMcpToolin the server's MCP bridge was a third hand-written copy of the chat tool and is nowReadonly<InProcessChatTool>;DiagramOperationKindsmoves to shared beside the command ids (the webview had its own); the stale "twin" doc aboveRegistryChatTool, a{@link}to a type the shared package cannot see, the deprecated flag's three assertions in the webview's flag test, and the indentation inchat-tools.ts.Typecheck 5/5, neutrality 5/5, client 361, extension-core 332, toolkit profile suites 46.
https://claude.ai/code/session_01EToj6RJRMSSHQiqGNMU9wv