@justmpm/ai-tool 0.7.8 → 0.7.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4615,6 +4615,9 @@ Ou edite manualmente o arquivo existente.
|
|
|
4615
4615
|
}
|
|
4616
4616
|
};
|
|
4617
4617
|
writeConfig(cwd, newConfig);
|
|
4618
|
+
const unmappedCount = allFiles.filter(
|
|
4619
|
+
(f) => detectFileAreas(f, newConfig).length === 0
|
|
4620
|
+
).length;
|
|
4618
4621
|
const sortedAreas = [...areaCounts.entries()].sort((a, b) => b[1].size - a[1].size);
|
|
4619
4622
|
let out = `
|
|
4620
4623
|
\u2705 Arquivo criado: .analyze/areas.config.json
|
|
@@ -4636,9 +4639,6 @@ Ou edite manualmente o arquivo existente.
|
|
|
4636
4639
|
out += ` ... e mais ${sortedAreas.length - 15}
|
|
4637
4640
|
`;
|
|
4638
4641
|
}
|
|
4639
|
-
const unmappedCount = allFiles.filter(
|
|
4640
|
-
(f) => detectFileAreas(f, currentConfig).length === 0
|
|
4641
|
-
).length;
|
|
4642
4642
|
if (unmappedCount > 0) {
|
|
4643
4643
|
out += `
|
|
4644
4644
|
\u26A0\uFE0F ${unmappedCount} arquivos sem \xE1rea definida
|
|
@@ -4655,13 +4655,46 @@ Ou edite manualmente o arquivo existente.
|
|
|
4655
4655
|
}
|
|
4656
4656
|
}
|
|
4657
4657
|
out += `
|
|
4658
|
-
\u{1F4A1}
|
|
4659
|
-
-
|
|
4660
|
-
-
|
|
4661
|
-
-
|
|
4662
|
-
-
|
|
4663
|
-
|
|
4664
|
-
|
|
4658
|
+
\u{1F4A1} Boas pr\xE1ticas:
|
|
4659
|
+
- Ideal: 5-15 \xE1reas (muitas \xE1reas \xE9 dif\xEDcil de navegar)
|
|
4660
|
+
- Use patterns para pastas, keywords para arquivos espalhados
|
|
4661
|
+
- Se uma \xE1rea tem <3 arquivos, considere mesclar com outra
|
|
4662
|
+
- Se tem >50 arquivos, considere dividir em sub-\xE1reas
|
|
4663
|
+
|
|
4664
|
+
\u{1F4DD} Como customizar:
|
|
4665
|
+
1. Renomear \xE1reas: altere o campo "name"
|
|
4666
|
+
2. Ajustar padr\xF5es: edite "patterns" (glob) ou "keywords"
|
|
4667
|
+
3. Adicionar descri\xE7\xF5es: campo "description" explica o dom\xEDnio
|
|
4668
|
+
4. Descri\xE7\xF5es de arquivos: use "descriptions" para documentos espec\xEDficos
|
|
4669
|
+
|
|
4670
|
+
\u{1F4A1} Exemplo de customiza\xE7\xE3o:
|
|
4671
|
+
|
|
4672
|
+
Antes (nome gen\xE9rico detectado):
|
|
4673
|
+
"user-profile": { "name": "User Profile", ... }
|
|
4674
|
+
|
|
4675
|
+
Depois (renomeado para dom\xEDnio de neg\xF3cio):
|
|
4676
|
+
"meu-perfil": { "name": "Meu Perfil", "description": "Edi\xE7\xE3o de perfil do usu\xE1rio" }
|
|
4677
|
+
|
|
4678
|
+
\u2699\uFE0F Quando usar autoDetect: false
|
|
4679
|
+
- Quando quer controle total das \xE1reas
|
|
4680
|
+
- Quando a detec\xE7\xE3o autom\xE1tica est\xE1 muito imprecisa
|
|
4681
|
+
- Quando o projeto tem dom\xEDnios muito espec\xEDficos
|
|
4682
|
+
|
|
4683
|
+
\u{1F4A1} Casos especiais:
|
|
4684
|
+
- Arquivos compartilhados: adicione a m\xFAltiplas \xE1reas
|
|
4685
|
+
- Utils globais: crie \xE1rea 'shared' ou use 'ignore'
|
|
4686
|
+
- Monorepo: use 'patterns' com caminhos relativos \xE0 raiz
|
|
4687
|
+
|
|
4688
|
+
\u{1F527} Manuten\xE7\xE3o:
|
|
4689
|
+
- Atualize o config ao criar/mover arquivos
|
|
4690
|
+
- Use 'ai-tool areas' para verificar arquivos sem \xE1rea
|
|
4691
|
+
- Use 'ai-tool area <nome>' para ver o que foi detectado
|
|
4692
|
+
|
|
4693
|
+
\u{1F4CB} Pr\xF3ximos passos:
|
|
4694
|
+
\u2192 Execute 'ai-tool areas' para ver o resultado
|
|
4695
|
+
\u2192 Use 'ai-tool area <nome>' para validar uma \xE1rea espec\xEDfica
|
|
4696
|
+
\u2192 Execute 'ai-tool map' para ver o resumo atualizado
|
|
4697
|
+
`;
|
|
4665
4698
|
return out.trim();
|
|
4666
4699
|
} catch (error) {
|
|
4667
4700
|
const message = error instanceof Error ? error.message : String(error);
|
|
@@ -4733,7 +4766,9 @@ function getAllCodeFiles5(dir, files = [], baseDir = dir) {
|
|
|
4733
4766
|
const ext = extname6(entry).toLowerCase();
|
|
4734
4767
|
if (CODE_EXTENSIONS6.has(ext)) {
|
|
4735
4768
|
const relativePath = fullPath.slice(baseDir.length + 1).replace(/\\/g, "/");
|
|
4736
|
-
|
|
4769
|
+
if (relativePath && !relativePath.startsWith("..")) {
|
|
4770
|
+
files.push(relativePath);
|
|
4771
|
+
}
|
|
4737
4772
|
}
|
|
4738
4773
|
}
|
|
4739
4774
|
} catch {
|
package/dist/cli.js
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
impact,
|
|
14
14
|
map,
|
|
15
15
|
suggest
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-PUA5CWMJ.js";
|
|
17
17
|
|
|
18
18
|
// src/cli.ts
|
|
19
19
|
import { resolve } from "path";
|
|
@@ -108,7 +108,7 @@ async function main() {
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
if (flags.mcp) {
|
|
111
|
-
const { startMcpServer } = await import("./server-
|
|
111
|
+
const { startMcpServer } = await import("./server-GII6BLXS.js");
|
|
112
112
|
await startMcpServer();
|
|
113
113
|
return;
|
|
114
114
|
}
|
package/dist/index.js
CHANGED
package/package.json
CHANGED