Skip to content

Commit b8e3a57

Browse files
George-iamclaude
andcommitted
fix: bin wrapper finds SDK data dir by pattern, inform user before setup
- bin/axme-code: search ~/.claude/plugins/data/axme-code* instead of hardcoded fallback (plugin data dir name varies) - axme_context: instruct agent to tell user "Initializing, 1-2 min" before running setup Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 4096680 commit b8e3a57

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

build.mjs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,15 @@ await build({
6868
mkdirSync("dist/plugin/bin", { recursive: true });
6969
writeFileSync("dist/plugin/bin/axme-code", `#!/bin/bash
7070
PLUGIN_DIR="\$(cd "\$(dirname "\$0")/.." && pwd)"
71-
DATA_DIR="\${CLAUDE_PLUGIN_DATA:-\$HOME/.claude/plugins/data/axme-code}"
72-
export NODE_PATH="\$DATA_DIR/node_modules:\$NODE_PATH"
71+
if [ -n "\$CLAUDE_PLUGIN_DATA" ]; then
72+
DATA_DIR="\$CLAUDE_PLUGIN_DATA"
73+
else
74+
# Find plugin data dir by pattern (name varies: axme-code, axme-code-inline, etc.)
75+
DATA_DIR="\$(ls -d \$HOME/.claude/plugins/data/axme-code* 2>/dev/null | head -1)"
76+
fi
77+
if [ -n "\$DATA_DIR" ]; then
78+
export NODE_PATH="\$DATA_DIR/node_modules:\$NODE_PATH"
79+
fi
7380
exec node "\$PLUGIN_DIR/cli.mjs" "\$@"
7481
`);
7582
chmodSync("dist/plugin/bin/axme-code", 0o755);

src/tools/context.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export function getFullContextSections(projectPath: string, workspacePath?: stri
7777
if (pathExists(setupLock)) {
7878
return [parts[0] + "\n\nSetup is already running. Wait for it to finish, then call axme_context again."];
7979
}
80-
return [parts[0] + "\n\nProject not initialized. Run `axme-code setup --plugin` now via Bash tool to create the knowledge base. Do NOT ask the user — just run it."];
80+
return [parts[0] + "\n\nProject not initialized. FIRST tell the user: 'Initializing AXME Code knowledge base for this project. This takes 1-2 minutes on first run.' THEN run `axme-code setup --plugin` via Bash tool. Do NOT ask permission — just inform and run."];
8181
}
8282

8383
// Safety rules (small, always inline)

0 commit comments

Comments
 (0)