Skip to content

refactor: remove unused chat exports from codersdk - #30959

Draft
ibetitsmike wants to merge 3 commits into
mainfrom
mike/codersdk-chat-dead-exports
Draft

ibetitsmike wants to merge 3 commits into
mainfrom
mike/codersdk-chat-dead-exports

Conversation

@ibetitsmike

@ibetitsmike ibetitsmike commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

Removes two unused exports from codersdk/chats.go: the ChatGitChange type and IsChatGitWatchFallbackMessage. Regenerating the TypeScript types drops the ChatGitChange interface from site/src/api/typesGenerated.ts.

Why removal is safe: neither symbol has a caller anywhere in this repository, including site/, cli/, enterprise/, scaletest/ and tests. A GitHub code search across the coder organization finds only forks of this file and a copy of typesGenerated.ts. IsChatGitWatchFallbackMessage lost its only caller when #25190 removed the agents TUI. The comment on the git watch messages loses the sentences about that helper and the "keep in sync" note: coderd/exp_chats.go uses these constants directly.

Kept on purpose:

Validation: the pre-commit hook passed (make gen, formatting, golangci-lint over every package and test file, and the slim build). make site/src/api/typesGenerated.ts produces exactly the TypeScript change in this PR.

Stack

This stack removes two unused chat exports from codersdk and moves 72 chat client methods in codersdk/chats.go onto two shared request helpers. Client behavior does not change.

  1. refactor: remove unused chat exports from codersdk #30959 Remove unused chat exports from codersdk
  2. test(codersdk): cover chat client request errors and options #30960 Cover chat client request errors and options
  3. refactor(codersdk): add chat client request helpers #30961 Add chat client request helpers, for the project and model methods
  4. refactor(codersdk): move chat settings client methods onto request helpers #30962 Move the chat settings methods onto the request helpers
  5. refactor(codersdk): move chat client methods onto request helpers #30963 Move the chat methods onto the request helpers

Xum, an AI agent, opened this PR for @ibetitsmike and wrote this description.

ChatMessageSource, ChatGitChange, and IsChatGitWatchFallbackMessage
have no callers in coder/coder or in other coder repositories.
IsChatGitWatchFallbackMessage lost its only caller when the agents TUI
was removed in #25190. Regenerating the TypeScript types drops the
ChatGitChange interface, which the site never used.

The git watch message comments drop the sentences that pointed at the
removed helper. coderd/exp_chats.go uses the constants directly, so the
"keep in sync" note no longer applies.
#30861 adds ChatMessageSkillInvocation right above ChatMessageSource.
Deleting ChatMessageSource here would make that PR conflict, so the
deletion waits until #30861 merges.
@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-18T17:17:49.797204Z 2745962 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 82bf36d46a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

@codex review

Xum, an AI agent, requested this review for @ibetitsmike.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 2745962b04

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

This branch has not been deployed

No deployments
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