CommandCodeAI / CommandCodeAI/command-code
Need to handle mods with code compilations errors on build and load
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- Sem dados de linguagem
- Estrelas
- 4k
- Forks
- 350
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
Summary
I built a mod, but while the cmd mods list showed it as available in the project, the command it had did not appear.
Turns out there was a compilation issue, but I had no way of knowing:
in the @.commandcode/mods/erd.ts there should be comands but i have reloaded but i dont see them available. but i see it is available cmd mods list
Built-in mods (4)
provider-anthropic · builtin
provider-copilot · builtin
provider-openai · builtin
update-notice · builtin
Mods (1)
erd · project
✻ Thought for 1 second [ctrl+o to expand]
⠶ Let me look at your mod file and check the Command Code mod docs to figure out why the commands aren't appearing.
READ [.commandcode/mods/erd.ts] 1011 lines
✻ Thought for 6 seconds [ctrl+o to expand]
⠶ Let me check if there's a TypeScript compilation issue or missing dependency.
SHELL [ls ~/projects/dthyresson/erd-mod/node_modules/@commandcode/harness 2>&1 | head -5]
│ ls: /Users/dthyresson/projects/dthyresson/erd-mod/node_modules/@commandcode/harness: No such file...
└ ... [ctrl+o to expand]
SHELL [ls ~/projects/dthyresson/erd-mod/schema/ 2>&1]
└ schema.sql
SHELL [node -e "try { require('~/projects/dthyresson/erd-mod/.commandcode/mods/erd.ts'); } catch(e) { co...]
│ Invalid regular expression: /^\s*\S+\s+([A-Za-z_]+(?:\s*\([^)]*(?:\([^)]*\)[^)]*)*\))?(?:\s|$)/i:...
└ ... [ctrl+o to expand]
✻ Thought for 29 seconds [ctrl+o to expand]
⠶ Found the issue. The regex on line 115 has an unmatched parenthesis — the capture group ( is never closed, making the regex invalid. This causes the mod to fail
to load entirely, which is why /cmd mods list shows it but none of its commands appear.
Expected Behavior
- the mod builder should run some type or compile checks
- on load of the mod, warn that a mod failed to load so can correct (or status of disable due to error)
- something to know while mod isn't working/available
Actual Behavior
- mod listed but commands it implements not present
Steps to reproduce the issue
- use mod builder but introduce some type or build compilation error in it
Command Code Version
1.5.0
Operating System
macOS
Terminal/IDE
ghostty
Shell
zsh
Additional context
No response
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
Reproduza a falha usando a expressão regular malformada relatada na linha 115 de .commandcode/mods/erd.ts e, em seguida, rastreie como o mod builder e cmd mods list lidam com o carregamento malsucedido. Considera-se concluído quando os erros de compilação ou carregamento são exibidos claramente e o status indisponível ou desabilitado do mod fica visível, em vez de listá-lo como utilizável.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- typescript
- Domínio
- build-system, cli
- Tipo de issue
- Bug
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Ativa
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 48/100