Files
oh-my-opencode/src/hooks/agent-usage-reminder/constants.ts
T

53 lines
1.5 KiB
TypeScript
Raw Normal View History

import { join } from "node:path";
import { getOpenCodeStorageDir } from "../../shared/data-path";
export const OPENCODE_STORAGE = getOpenCodeStorageDir();
export const AGENT_USAGE_REMINDER_STORAGE = join(
OPENCODE_STORAGE,
"agent-usage-reminder",
);
// All tool names normalized to lowercase for case-insensitive matching
export const TARGET_TOOLS = new Set([
"grep",
"safe_grep",
"glob",
"safe_glob",
"webfetch",
"context7_resolve-library-id",
"context7_get-library-docs",
"grep_app_searchgithub",
]);
export const AGENT_TOOLS = new Set([
"task",
"call_omo_agent",
2026-01-09 02:24:43 +09:00
"sisyphus_task",
]);
export const REMINDER_MESSAGE = `
[Agent Usage Reminder]
You called a search/fetch tool directly without leveraging specialized agents.
2026-01-09 02:24:43 +09:00
RECOMMENDED: Use sisyphus_task with explore/librarian agents for better results:
\`\`\`
// Parallel exploration - fire multiple agents simultaneously
2026-01-09 02:24:43 +09:00
sisyphus_task(agent="explore", prompt="Find all files matching pattern X")
sisyphus_task(agent="explore", prompt="Search for implementation of Y")
sisyphus_task(agent="librarian", prompt="Lookup documentation for Z")
// Then continue your work while they run in background
// System will notify you when each completes
\`\`\`
WHY:
- Agents can perform deeper, more thorough searches
- Background tasks run in parallel, saving time
- Specialized agents have domain expertise
- Reduces context window usage in main session
2026-01-09 02:24:43 +09:00
ALWAYS prefer: Multiple parallel sisyphus_task calls > Direct tool calls
`;