Skip to content

Commit c27d742

Browse files
committed
Merge branch 'master' of github.com:editor-code-assistant/eca
# Conflicts: # CHANGELOG.md
2 parents ebb8bdc + 1bb135a commit c27d742

File tree

4 files changed

+41
-37
lines changed

4 files changed

+41
-37
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
- Add `providers/list`, `providers/login`, `providers/loginInput`, `providers/logout` requests and `providers/updated` notification for settings-based provider/model management.
66
- Add LiteLLM, LM Studio, Mistral, and Moonshot as built-in providers with login support.
77
- Fix Z-AI provider config using wrong API type and URL.
8+
- Improve explorer subagent prompt, remove role based approach.
9+
- Remove model/variant list from spawn_agent tool description so it doesn't use models when it is not asked to. #369
810

911
## 0.120.1
1012

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
1-
You are a file search specialist. Your role is to locate and retrieve data from the codebase.
1+
Handle file and codebase search tasks.
22

3-
Core Constraints:
4-
- No Writing: Do not create or modify files.
5-
- Navigation: Use grep for patterns or content search, use read for file inspection if needed.
6-
- Communication: Be concise. Provide absolute file paths, concrete evidence, and brief findings. No emojis.
3+
Locate relevant files, symbols, references, and logic paths in the codebase using the provided tools.
74

8-
Goal: Map the requested logic/files as efficiently as possible and report your findings in a clear way.
5+
Constraints:
6+
- Do not create or modify files.
7+
- Use grep for pattern or content search.
8+
- Use read only when inspection is necessary.
9+
- Prefer direct, minimal search steps.
10+
- Avoid unnecessary exploration.
11+
- Be concise.
12+
- Return absolute file paths, concrete evidence, and brief findings.
13+
- Do not use emojis.
14+
- Do not speculate when evidence is missing.
15+
16+
Output expectations:
17+
- Identify the most relevant files or code paths.
18+
- Show the evidence supporting each finding.
19+
- Summarize the result clearly and briefly.

resources/prompts/tools/spawn_agent.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,4 @@ Agent Limits: Sub-agents cannot spawn other agents (no nesting) and have access
88
Strict rules for arguments:
99
- 'task': Provide a highly detailed prompt. Explicitly state whether it should write/edit code or just research, how to verify its work, and exactly what specific information it must return to you.
1010
- 'activity': Must be a concise 3-4 word label for the UI (e.g., "exploring codebase", "refactoring module").
11-
- 'model' & 'variant': - Only include these keys if the user explicitly requests a specific model or variant. Otherwise, the agent defaults to its default configuration.
12-
- If the user did not ask for a model, OMIT the `model` key entirely. Never send an empty string.
13-
- If the user did not ask for a variant, OMIT the `variant` key entirely. Never send an empty string.
11+
- 'model' & 'variant': - NEVER include these arguments if the user hasn't explicitly requested a specific model or variant.

src/eca/features/tools/agent.clj

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
[eca.config :as config]
66
[eca.features.tools.util :as tools.util]
77
[eca.logger :as logger]
8-
[eca.messenger :as messenger]
9-
[eca.shared :refer [multi-str]]))
8+
[eca.messenger :as messenger]))
109

1110
(set! *warn-on-reflection* true)
1211

@@ -273,32 +272,26 @@
273272

274273
(defn definitions
275274
[config db]
276-
(let [model-names (available-model-names db)
277-
variant-names (available-variant-names config db)]
278-
{"spawn_agent"
279-
{:description (build-description config)
280-
:parameters {:type "object"
281-
:properties {"agent" {:type "string"
282-
:description "Name of the agent to spawn"}
283-
"task" {:type "string"
284-
:description "The detailed instructions for the agent"}
285-
"activity" {:type "string"
286-
:description "Concise label (max 3-4 words) shown in the UI while the agent runs, e.g. \"exploring codebase\", \"reviewing changes\", \"analyzing tests\"."}
287-
"model" {:type "string"
288-
:description (cond-> "Optional model override. Include this key ONLY when the user explicitly asked for a specific model. Otherwise omit the key entirely; never send an empty string."
289-
(and (seq model-names) (> (count model-names) 1))
290-
(multi-str "One of these models can be used if the user explicitely requests it: " model-names))}
291-
"variant" {:type "string"
292-
:description (cond-> "Optional variant override. Include this key ONLY when the user explicitly asked for a specific variant."
293-
(seq variant-names) (multi-str "One of these variants can be used if the user requests it: "
294-
variant-names))}}
295-
:required ["agent" "task" "activity"]}
296-
:handler #'spawn-agent
297-
:summary-fn (fn [{:keys [args]}]
298-
(if-let [agent-name (get args "agent")]
299-
(let [activity (get args "activity" "working")]
300-
(format "%s: %s" agent-name activity))
301-
"Spawning agent"))}}))
275+
{"spawn_agent"
276+
{:description (build-description config)
277+
:parameters {:type "object"
278+
:properties {"agent" {:type "string"
279+
:description "Name of the agent to spawn"}
280+
"task" {:type "string"
281+
:description "The detailed instructions for the agent"}
282+
"activity" {:type "string"
283+
:description "Concise label (max 3-4 words) shown in the UI while the agent runs, e.g. \"exploring codebase\", \"reviewing changes\", \"analyzing tests\"."}
284+
"model" {:type "string"
285+
:description "Optional sub-agent model override. Reserved for explicit user override only. Omit unless the user explicitly named a model."}
286+
"variant" {:type "string"
287+
:description "Optional sub-agent model variant override. Reserved for explicit user override only. Omit unless the user explicitly named a variant."}}
288+
:required ["agent" "task" "activity"]}
289+
:handler #'spawn-agent
290+
:summary-fn (fn [{:keys [args]}]
291+
(if-let [agent-name (get args "agent")]
292+
(let [activity (get args "activity" "working")]
293+
(format "%s: %s" agent-name activity))
294+
"Spawning agent"))}})
302295

303296
(defmethod tools.util/tool-call-details-before-invocation :spawn_agent
304297
[_name arguments _server {:keys [db config chat-id tool-call-id]}]

0 commit comments

Comments
 (0)