Skip to content

Commit 5159da7

Browse files
committed
Fix variable replacing in some tool prompts.
1 parent 0d9191f commit 5159da7

File tree

12 files changed

+16
-12
lines changed

12 files changed

+16
-12
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
## Unreleased
44

55
- Updated instructions for `/login` command and invalid input handling.
6+
- Fix server name on `chat/contentReceived` when preparing tool call.
7+
- Fix variable replacing in some tool prompts.
68

79
## 0.75.4
810

resources/prompts/compact.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ However, if the session is primarily a general conversation and not technical, f
1313
- Summarize the chat in a way that allows any LLM to continue the conversation based on the summary.
1414

1515
Purpose: To create a comprehensive record that ensures no important details or context are lost between sessions. This process prioritizes thoroughness over brevity to retain all critical information..
16-
$addionalUserInput
16+
{additionalUserInput}
1717

1818
## Response
1919

resources/prompts/init.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ Analyze this codebase and create an AGENTS.md file containing:
44

55
The file you create will be given to agentic coding agents (such as yourself) that operate in this repository. Make it about 20 lines long.
66

7-
If there's already an AGENTS.md, improve it if it's located in $workspaceRoots.
7+
If there's already an AGENTS.md, improve it if it's located in {workspaceFolders}.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
Returns a recursive tree view of files and directories starting from the specified path.
22
The path parameter must be an absolute path, not a relative path.
3-
**Only works within the directories: $workspaceRoots.**
3+
**Only works within the directories: {workspaceRoots}.**
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
Move or rename files and directories.
22
Can move files between directories and rename them in a single operation.
33
If the destination exists, the operation will fail. Works across different directories and can be used for simple renaming within the same directory.
4-
Both source and destination must be within the directories: $workspaceRoots.
4+
Both source and destination must be within the directories: {workspaceRoots}.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
Read the contents of a file from the file system. Use this tool when you need to examine the contents of a single file.
22
Optionally use the 'line_offset' and/or 'limit' parameters to read specific contents of the file when you know the range.
3-
Prefer call once this tool over multiple calls passing small offsets. **Only works within the directories: $workspaceRoots.**
3+
Prefer call once this tool over multiple calls passing small offsets. **Only works within the directories: {workspaceRoots}.**

resources/prompts/tools/eca_write_file.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ Create a new file or completely overwrite an existing file with new content.
22
This tool will automatically create any necessary parent directories if they don't exist.
33
Use this tool when you want to create a new file from scratch or completely replace the entire content of an existing file.
44
For partial edits or content replacement within existing files, use eca_edit_file instead.
5-
**Only works within the directories: $workspaceRoots.**
5+
**Only works within the directories: {workspaceRoots}.**

src/eca/features/chat.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@
628628
(assert-chat-not-stopped! chat-ctx)
629629
(transition-tool-call! db* chat-ctx id :tool-prepare
630630
{:name name
631-
:server (tool-name->server name all-tools)
631+
:server (:name (tool-name->server name all-tools))
632632
:origin (tool-name->origin name all-tools)
633633
:arguments-text arguments-text
634634
:summary (f.tools/tool-call-summary all-tools name nil config)}))

src/eca/features/completion.clj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
[eca.llm-api :as llm-api]
77
[eca.logger :as logger]))
88

9+
(set! *warn-on-reflection* true)
10+
911
(def ^:private logger-tag "[COMPLETION]")
1012

1113
(def ^:private completion-tag "<ECA_TAG>")

src/eca/features/prompt.clj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,9 @@
113113
(defn compact-prompt [additional-input config]
114114
(replace-vars
115115
(compact-prompt-template (:compactPromptFile config))
116-
{:addionalUserInput (if additional-input
117-
(format "You MUST respect this user input in the summarization: %s." additional-input)
118-
"")}))
116+
{:additionalUserInput (if additional-input
117+
(format "You MUST respect this user input in the summarization: %s." additional-input)
118+
"")}))
119119

120120
(defn inline-completion-prompt [config]
121121
(let [prompt-file (get-in config [:completion :systemPromptFile])]

0 commit comments

Comments
 (0)