Skip to content

Commit b181d6d

Browse files
committed
feat: added support for Solidity, Crystal and Haskel languages in semantic search
1 parent 158666f commit b181d6d

3 files changed

Lines changed: 29 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- correctly selecting the input history item
66
- improved task memory management in renderer process
77
- correctly restoring stashed changes on failures when switching to worktree
8+
- added support for Solidity, Crystal and Haskel languages in semantic search
89

910
## [0.71.0]
1011

scripts/download-probe.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import AdmZip from 'adm-zip';
99

1010
const streamPipeline = promisify(pipeline);
1111

12-
const PROBE_VERSION = 'v0.6.0-rc161';
12+
const PROBE_VERSION = 'v0.6.0-rc325';
1313
const BASE_URL = `https://github.com/probelabs/probe/releases/download/${PROBE_VERSION}`;
1414
const RESOURCES_DIR = process.env.RESOURCES_DIR || './resources';
1515

src/main/agent/tools/power.ts

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -988,13 +988,29 @@ Do not use escape characters \\ in the string like \\n or \\" and others. Do not
988988
language: z.string().optional().describe('Limit search to files of a specific programming language'),
989989
}),
990990
execute: async (input, { toolCallId }) => {
991-
const { query: searchQuery, path: inputPath, allowTests, exact, maxTokens: paramMaxTokens, language } = input;
992-
task.addToolMessage(toolCallId, TOOL_GROUP_NAME, TOOL_SEMANTIC_SEARCH, { searchQuery, path: inputPath }, undefined, undefined, promptContext);
991+
const { query: searchQuery, path: inputPath, allowTests, exact, maxResults: paramMaxResults, maxTokens: paramMaxTokens, language } = input;
992+
task.addToolMessage(
993+
toolCallId,
994+
TOOL_GROUP_NAME,
995+
TOOL_SEMANTIC_SEARCH,
996+
{
997+
query: searchQuery,
998+
path: inputPath,
999+
allowTests,
1000+
exact,
1001+
maxResults: paramMaxResults,
1002+
maxTokens: paramMaxTokens,
1003+
language,
1004+
},
1005+
undefined,
1006+
undefined,
1007+
promptContext,
1008+
);
9931009

9941010
const toolName = `${TOOL_GROUP_NAME}${TOOL_GROUP_NAME_SEPARATOR}${TOOL_SEMANTIC_SEARCH}`;
9951011
const questionKey = toolName;
9961012
const questionText = 'Approve running codebase search?';
997-
const questionSubject = `Query: ${searchQuery}\nPath: ${inputPath || '.'}\nAllow Tests: ${allowTests}\nExact: ${exact}\nLanguage: ${language}`;
1013+
const questionSubject = `Query: ${searchQuery}\nPath: ${inputPath || '.'}\nAllow Tests: ${allowTests}\nExact: ${exact}\nMax Results: ${paramMaxResults ?? 'default'}\nMax Tokens: ${paramMaxTokens}\nLanguage: ${language || 'all'}`;
9981014

9991015
const [isApproved, userInput] = await approvalManager.handleToolApproval(toolName, input, questionKey, questionText, questionSubject);
10001016

@@ -1040,6 +1056,13 @@ Do not use escape characters \\ in the string like \\n or \\" and others. Do not
10401056
'rb',
10411057
'php',
10421058
'swift',
1059+
'solidity',
1060+
'sol',
1061+
'crystal',
1062+
'cr',
1063+
'haskell',
1064+
'hs',
1065+
'lhs',
10431066
'csharp',
10441067
'cs',
10451068
'yaml',
@@ -1058,6 +1081,7 @@ Do not use escape characters \\ in the string like \\n or \\" and others. Do not
10581081
timeout: 5 * 60, // 5 minutes
10591082
json: false,
10601083
maxTokens: effectiveMaxTokens,
1084+
maxResults: paramMaxResults,
10611085
language: effectiveLanguage,
10621086
});
10631087

0 commit comments

Comments
 (0)