New extensions shipping with Agent JAE: - jae-rules: Per-project .jae/rules.md injection - cost-tracker: Token/cost tracking with budget limits - project-dna: Auto-analyze project fingerprint - teach-mode: Pedagogical explanation mode - bookmarks: File bookmark management - replay: Session recording and asciicast export - checkpoints: Git-based undo/time-travel - pr-review: Autonomous PR diff review - auto-docs: Auto-generate README and docs - screenshot-context: Vision analysis for screenshots - deploy: One-command deploy (Docker/Vercel/rsync/static) - pair-programming: Real-time file watching with feedback - dashboard: Terminal HUD with live stats - swarm: Multi-agent parallel task execution - skill-marketplace: Search/install/publish skills - widget-api-demo: TUI widget API demonstration
38 lines
1.3 KiB
TypeScript
38 lines
1.3 KiB
TypeScript
import type { ExtensionAPI } from "@jaeswift/jae-coding-agent";
|
|
|
|
const TEACH_PROMPT = `
|
|
# Teach Mode Active
|
|
|
|
You are in TEACH MODE. For every action you take:
|
|
1. Explain WHY you are making this decision (not just what)
|
|
2. Describe alternative approaches you considered and why you rejected them
|
|
3. Point out patterns, best practices, and potential pitfalls
|
|
4. When writing code, add educational comments explaining non-obvious logic
|
|
5. After completing a task, provide a brief summary of what was learned
|
|
6. Use analogies and examples to clarify complex concepts
|
|
7. Highlight any trade-offs being made (performance vs readability, etc.)
|
|
`;
|
|
|
|
export default function (pi: ExtensionAPI) {
|
|
let teachModeOn = false;
|
|
|
|
pi.on("before_agent_start", async (_event, _ctx) => {
|
|
if (teachModeOn) {
|
|
return { systemPrompt: TEACH_PROMPT };
|
|
}
|
|
});
|
|
|
|
pi.registerCommand("teach", {
|
|
description: "Toggle teach mode - JAE explains every decision in detail",
|
|
handler: async (_args, ctx) => {
|
|
teachModeOn = !teachModeOn;
|
|
ctx.ui.setStatus("teach-mode", teachModeOn ? "\u{1F393} Teach Mode" : undefined);
|
|
ctx.ui.notify(
|
|
teachModeOn
|
|
? "\u{1F393} Teach Mode ON - JAE will explain every decision in detail."
|
|
: "\u{1F393} Teach Mode OFF - Back to normal operation.",
|
|
"info",
|
|
);
|
|
},
|
|
});
|
|
}
|