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
47 lines
1.6 KiB
TypeScript
47 lines
1.6 KiB
TypeScript
import type { ExtensionAPI } from "@jaeswift/jae-coding-agent";
|
|
|
|
export default function (pi: ExtensionAPI) {
|
|
pi.on("before_agent_start", async (_event, _ctx) => {
|
|
return {
|
|
systemPrompt: `
|
|
# Screenshot & Image Analysis
|
|
|
|
When the user pastes or attaches an image (screenshot, diagram, mockup, error screenshot):
|
|
1. Analyze the visual content thoroughly
|
|
2. If it's a UI screenshot: describe layout, identify components, suggest improvements
|
|
3. If it's an error screenshot: read the error message, diagnose the issue, suggest fixes
|
|
4. If it's a design mockup: break down into implementable components
|
|
5. If it's a diagram: interpret the architecture/flow and relate to the codebase
|
|
6. If it's code in an image: transcribe it accurately and analyze
|
|
Always acknowledge what you see in the image before providing analysis.
|
|
`,
|
|
};
|
|
});
|
|
|
|
pi.on("input", async (event, ctx) => {
|
|
// Check if input contains image attachments
|
|
const input = event as any;
|
|
if (input.images && input.images.length > 0) {
|
|
ctx.ui.notify(
|
|
`\u{1F4F7} ${input.images.length} image(s) detected. JAE will analyze with vision capabilities.`,
|
|
"info",
|
|
);
|
|
}
|
|
});
|
|
|
|
pi.registerCommand("screenshot", {
|
|
description: "Tips for using screenshot context with JAE",
|
|
handler: async (_args, ctx) => {
|
|
ctx.ui.notify(
|
|
`\u{1F4F7} Screenshot Context Tips:
|
|
|
|
- Paste screenshots directly into the chat
|
|
- JAE will automatically analyze images with vision
|
|
- Supported: UI screenshots, error messages, diagrams, mockups
|
|
- For best results, crop to the relevant area
|
|
- You can paste multiple images in one message`,
|
|
"info",
|
|
);
|
|
},
|
|
});
|
|
}
|