Class: Yorishiro::Tools::ExitPlanMode
Overview
A plan-mode-only tool the model calls to signal that it has finished
researching and is ready to present its implementation plan. Calling it
is what breaks the plan loop, so the model has an explicit way to stop
reading files instead of looping on read-only tools forever.
Instance Method Summary
collapse
#configure, #definition, #permission_check, #preview
Instance Method Details
#description ⇒ Object
18
19
20
21
22
23
24
|
# File 'lib/yorishiro/tools/exit_plan_mode.rb', line 18
def description
"Call this tool once you have finished researching and are ready to " \
"present your implementation plan to the user for approval. Pass the " \
"complete plan as the `plan` argument. As soon as you understand the " \
"task, STOP calling read-only tools (read_file, list_files) and call " \
"this tool instead."
end
|
#execute(**params) ⇒ Object
36
37
38
|
# File 'lib/yorishiro/tools/exit_plan_mode.rb', line 36
def execute(**params)
params[:plan] || params["plan"] || ""
end
|
#name ⇒ Object
14
15
16
|
# File 'lib/yorishiro/tools/exit_plan_mode.rb', line 14
def name
"exit_plan_mode"
end
|
#parameters ⇒ Object
26
27
28
29
30
31
32
33
34
|
# File 'lib/yorishiro/tools/exit_plan_mode.rb', line 26
def parameters
{
type: "object",
properties: {
plan: { type: "string", description: "The complete implementation plan as markdown text" }
},
required: ["plan"]
}
end
|
#read_only? ⇒ Boolean
10
11
12
|
# File 'lib/yorishiro/tools/exit_plan_mode.rb', line 10
def read_only?
true
end
|