fix: spelling errors in documentation. (#297)
* fix: correct typos in documentation and agent files Fix multiple instances of "assest" typo to "assets" in documentation Correct "quetsions" typo to "questions" in repository structure sections Add new words to cSpell dictionary in VS Code settings * feat(trae): add support for trae ide integration - Add trae guide documentation - Update installer to support trae configuration - Include trae in ide options and documentation references - Fix typo in architect agent documentation --------- Co-authored-by: Devin Stagner <devin@blackstag.family>
This commit is contained in:
@@ -57,6 +57,8 @@ class IdeSetup {
|
||||
return this.setupClaudeCode(installDir, selectedAgent);
|
||||
case "windsurf":
|
||||
return this.setupWindsurf(installDir, selectedAgent);
|
||||
case "trae":
|
||||
return this.setupTrae(installDir, selectedAgent);
|
||||
case "roo":
|
||||
return this.setupRoo(installDir, selectedAgent);
|
||||
case "cline":
|
||||
@@ -210,6 +212,55 @@ class IdeSetup {
|
||||
return true;
|
||||
}
|
||||
|
||||
async setupTrae(installDir, selectedAgent) {
|
||||
const traeRulesDir = path.join(installDir, ".trae", "rules");
|
||||
const agents = selectedAgent? [selectedAgent] : await this.getAllAgentIds(installDir);
|
||||
|
||||
await fileManager.ensureDirectory(traeRulesDir);
|
||||
|
||||
for (const agentId of agents) {
|
||||
// Find the agent file
|
||||
const agentPath = await this.findAgentPath(agentId, installDir);
|
||||
|
||||
if (agentPath) {
|
||||
const agentContent = await fileManager.readFile(agentPath);
|
||||
const mdPath = path.join(traeRulesDir, `${agentId}.md`);
|
||||
|
||||
// Create MD content (similar to Cursor but without frontmatter)
|
||||
let mdContent = `# ${agentId.toUpperCase()} Agent Rule\n\n`;
|
||||
mdContent += `This rule is triggered when the user types \`@${agentId}\` and activates the ${await this.getAgentTitle(
|
||||
agentId,
|
||||
installDir
|
||||
)} agent persona.\n\n`;
|
||||
mdContent += "## Agent Activation\n\n";
|
||||
mdContent +=
|
||||
"CRITICAL: Read the full YAML, start activation to alter your state of being, follow startup section instructions, stay in this being until told to exit this mode:\n\n";
|
||||
mdContent += "```yaml\n";
|
||||
// Extract just the YAML content from the agent file
|
||||
const yamlContent = extractYamlFromAgent(agentContent);
|
||||
if (yamlContent) {
|
||||
mdContent += yamlContent;
|
||||
}
|
||||
else {
|
||||
// If no YAML found, include the whole content minus the header
|
||||
mdContent += agentContent.replace(/^#.*$/m, "").trim();
|
||||
}
|
||||
mdContent += "\n```\n\n";
|
||||
mdContent += "## File Reference\n\n";
|
||||
const relativePath = path.relative(installDir, agentPath).replace(/\\/g, '/');
|
||||
mdContent += `The complete agent definition is available in [${relativePath}](${relativePath}).\n\n`;
|
||||
mdContent += "## Usage\n\n";
|
||||
mdContent += `When the user types \`@${agentId}\`, activate this ${await this.getAgentTitle(
|
||||
agentId,
|
||||
installDir
|
||||
)} persona and follow all instructions defined in the YAML configuration above.\n`;
|
||||
|
||||
await fileManager.writeFile(mdPath, mdContent);
|
||||
console.log(chalk.green(`✓ Created rule: ${agentId}.md`));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async findAgentPath(agentId, installDir) {
|
||||
// Try to find the agent file in various locations
|
||||
const possiblePaths = [
|
||||
|
||||
Reference in New Issue
Block a user