feat(tools): refactor slashcommand to support options and caching
- Extract createSlashcommandTool factory with SlashcommandToolOptions - Export discoverCommandsSync for external use - Move description building to lazy evaluation with caching - Support pre-warming cache with provided commands and skills - Simplify tool initialization in plugin with new factory approach This allows the slashcommand tool to be instantiated with custom options while maintaining backward compatibility through lazy loading. 🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
+1
-2
@@ -19,7 +19,7 @@ import {
|
||||
|
||||
import { grep } from "./grep"
|
||||
import { glob } from "./glob"
|
||||
import { slashcommand } from "./slashcommand"
|
||||
export { createSlashcommandTool, discoverCommandsSync } from "./slashcommand"
|
||||
|
||||
import {
|
||||
session_list,
|
||||
@@ -73,7 +73,6 @@ export const builtinTools: Record<string, ToolDefinition> = {
|
||||
ast_grep_replace,
|
||||
grep,
|
||||
glob,
|
||||
slashcommand,
|
||||
session_list,
|
||||
session_read,
|
||||
session_search,
|
||||
|
||||
Reference in New Issue
Block a user