Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Split commands.ts by topic

Abierto
#1,135 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Refactorización
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
typescript, vscode

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
TypeScript
Estrellas
131
Forks
48
Merge medio
2 d 3 h
PR fusionados (30 d)
16

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de coder/vscode-coder

Todos los issues de coder/vscode-coder

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.