refactor(effect): resolve built tools through the registry

This commit is contained in:
Kit Langton
2026-04-02 22:18:06 -04:00
parent 8daeacc989
commit 0653e07c19
10 changed files with 224 additions and 147 deletions
+2 -2
View File
@@ -28,13 +28,13 @@ import { BashTool } from "../../tool/bash"
import { TodoWriteTool } from "../../tool/todo"
import { Locale } from "../../util/locale"
type ToolProps<T extends Tool.Info> = {
type ToolProps<T> = {
input: Tool.InferParameters<T>
metadata: Tool.InferMetadata<T>
part: ToolPart
}
function props<T extends Tool.Info>(part: ToolPart): ToolProps<T> {
function props<T>(part: ToolPart): ToolProps<T> {
const state = part.state
return {
input: state.input as Tool.InferParameters<T>,