Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

Split commands.ts by topic

Ouverte
#1,135 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 2 jours

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
48/100
Type d'issue
Refactorisation
Clarté
Clairement spécifiée
Activité
Active
Stack technique
typescript, vscode

Piste de recherche

Start with src/commands.ts and the existing topic-split tests, including commands.netcheck.test.ts and commands.openWorkspace.test.ts; compare their organization with the command handlers. Review src/command/ before moving or renaming it, and identify the shared plumbing named in the proposal. Done means topic modules match the test split, registration delegates to them, and behavior and telemetry span threading remain unchanged.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Improvement tech-debt vs-code

src/commands.ts is 1,820 lines. One Commands class holds every command palette command, plus the helpers behind them. Its tests are already split by topic (commands.netcheck.test.ts, commands.openWorkspace.test.ts, …), but the source isn't.

Topics currently mixed into the class

  • Auth and deployments: login, logout, switchDeployment, manageCredentials, askSignOutCli, welcome/logout messages
  • Diagnostics: speedTest, netcheck, pingWorkspace, supportBundle (+ path prompt and consent), exportTelemetry, viewLogs
  • SSH config: openSshConfig, pickSshConfigPath, connectedSshConfigPath, applyRecommendedSettings
  • Opening workspaces: open, openFromSidebar, openWorkspaceFromSidebar, openDevContainer, pickWorkspace, openWorkspace, toWorkspaceAuthority, recentlyOpened, reusableAuthority, multi-window notification
  • Workspace actions: createWorkspace, updateWorkspace, navigateToWorkspace, navigateToWorkspaceSettings, openWorkspaceInDashboard, openAppStatus

Proposal

  1. Move each topic into a src/commands/ module that matches the existing test split. The shared plumbing (resolveClientAndWorkspace, resolveCliEnv, requireExtensionBaseUrl) goes in one place they all import.
  2. Keep command registration thin, so each handler delegates to its topic module.
  3. Rename or merge src/command/ first, because command/ (process exec) next to commands/ (VS Code commands) is confusing. diagnosticFlow.ts fits cli/, and exec.ts is generic process execution.

Non-goals: no behavior changes and no new abstractions. Move methods by topic and keep telemetry span threading as is. Related: #769 (command test coverage), #1066 (same split for remote.ts).

Filed by Claude Code for @EhabY.

Langage dominant
TypeScript
Étoiles
131
Forks
48
Merge moyen
2 j 3 h
PR mergées (30 j)
16

Préparer son environnement

Ouvrir dans Codespaces

Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de coder/vscode-coder

Toutes les issues de coder/vscode-coder

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.