Files
oh-my-openagent/src/hooks/agent-usage-reminder/constants.ts
YeonGyu-Kim a691a3ac0a refactor: migrate delegate_task to task tool with metadata fixes
- Rename delegate_task tool to task across codebase (100 files)
- Update model references: claude-opus-4-6 → 4-5, gpt-5.3-codex → 5.2-codex
- Add tool-metadata-store to restore metadata overwritten by fromPlugin()
- Add session ID polling for BackgroundManager task sessions
- Await async ctx.metadata() calls in tool executors
- Add ses_ prefix guard to getMessageDir for performance
- Harden BackgroundManager with idle deferral and error handling
- Fix duplicate task key in sisyphus-junior test object literals
- Fix unawaited showOutputToUser in ast_grep_replace
- Fix background=true → run_in_background=true in ultrawork prompt
- Fix duplicate task/task references in docs and comments
2026-02-06 21:35:30 +09:00

55 lines
1.5 KiB
TypeScript

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_query-docs",
"websearch_web_search_exa",
"context7_get-library-docs",
"grep_app_searchgithub",
]);
export const AGENT_TOOLS = new Set([
"task",
"call_omo_agent",
"task",
]);
export const REMINDER_MESSAGE = `
[Agent Usage Reminder]
You called a search/fetch tool directly without leveraging specialized agents.
RECOMMENDED: Use task with explore/librarian agents for better results:
\`\`\`
// Parallel exploration - fire multiple agents simultaneously
task(agent="explore", prompt="Find all files matching pattern X")
task(agent="explore", prompt="Search for implementation of Y")
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
ALWAYS prefer: Multiple parallel task calls > Direct tool calls
`;