Skip to content

Commit d2d0049

Browse files
committed
Tweak agent-definition.ts to export ToolName directly
1 parent 1165a71 commit d2d0049

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

.agents/types/agent-definition.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ export interface AgentStepContext {
239239
export type ToolCall<T extends ToolName = ToolName> = {
240240
[K in T]: {
241241
toolName: K
242-
input: Tools.GetToolParams<K>
242+
input: GetToolParams<K>
243243
includeToolCall?: boolean
244244
}
245245
}[T]
@@ -338,14 +338,13 @@ export type ModelName =
338338
| 'z-ai/glm-4.6:nitro'
339339
| (string & {})
340340

341-
export type { Tools }
342-
343-
import type * as Tools from './tools'
341+
import type { ToolName, GetToolParams } from './tools'
344342
import type {
345343
Message,
346344
ToolResultOutput,
347345
JsonObjectSchema,
348346
MCPConfig,
349347
Logger,
350348
} from './util-types'
351-
type ToolName = Tools.ToolName
349+
350+
export type { ToolName, GetToolParams }

.agents/types/tools.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export interface AddMessageParams {
5959
export interface CodeSearchParams {
6060
/** The pattern to search for. */
6161
pattern: string
62-
/** Optional ripgrep flags to customize the search (e.g., "-i" for case-insensitive, "-g *.ts -g *.js" for TypeScript and JavaScript files only, "-g !*.test.ts" to exclude Typescript test files, "-A 3" for 3 lines after match, "-B 2" for 2 lines before match, --no-ignore to include files in ignored by .gitignore).
62+
/** Optional ripgrep flags to customize the search (e.g., "-i" for case-insensitive, "-t ts -t js" for TypeScript and JavaScript files only, "-A 3" for 3 lines after match, "-B 2" for 2 lines before match, "--type-not py" to exclude Python files). */
6363
flags?: string
6464
/** Optional working directory to search within, relative to the project root. Defaults to searching the entire project. */
6565
cwd?: string
@@ -91,7 +91,7 @@ export interface GlobParams {
9191
}
9292

9393
/**
94-
* List files and directories in the specified path. Returns information about each entry including name, type, size, and modification time.
94+
* List files and directories in the specified path. Returns separate arrays of file names and directory names.
9595
*/
9696
export interface ListDirectoryParams {
9797
/** Directory path to list, relative to the project root. */

common/src/templates/initial-agents-dir/types/agent-definition.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ export interface AgentStepContext {
239239
export type ToolCall<T extends ToolName = ToolName> = {
240240
[K in T]: {
241241
toolName: K
242-
input: Tools.GetToolParams<K>
242+
input: GetToolParams<K>
243243
includeToolCall?: boolean
244244
}
245245
}[T]
@@ -338,14 +338,13 @@ export type ModelName =
338338
| 'z-ai/glm-4.6:nitro'
339339
| (string & {})
340340

341-
export type { Tools }
342-
343-
import type * as Tools from './tools'
341+
import type { ToolName, GetToolParams } from './tools'
344342
import type {
345343
Message,
346344
ToolResultOutput,
347345
JsonObjectSchema,
348346
MCPConfig,
349347
Logger,
350348
} from './util-types'
351-
type ToolName = Tools.ToolName
349+
350+
export type { ToolName, GetToolParams }

0 commit comments

Comments
 (0)