feat: add consultant feature for asking a configured model mid-session
Adds a new 'consult' tool that makes single tool-less calls to a configured consultant model. The feature includes: - Consult backend (consult.rs) with permission checks - Call limit (default 5 per session) tracked in State - Three nudge triggers: before exit_plan, after edits, after 3 failed tools - Side-panel card showing consultant status and call count - Config keys: consultant = "<model>" to enable; consultant_max_calls for limit - All nudges are always on; disable by unsetting the consultant config The consultant model sees the question and context (passed by itself since the tool has no context visibility). Token usage counts toward subagent quotas.
This commit is contained in:
8 files changed
+418
-4
No files matched your search
@@ -271,6 +271,9 @@ impl Agent {
|
||||
crate::herdr::set_session(session.path());
|
||||
self.session = session;
|
||||
self.window.reset();
|
||||
if let Some(c) = self.cx.state.consult.get() {
|
||||
c.reset();
|
||||
}
|
||||
self.publish();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user