fix(codemode): canonicalize dotted tool paths (#36994)

This commit is contained in:
Aiden Cline 2026-07-15 11:09:09 -05:00 committed by GitHub
commit 22334b94c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 242 additions and 44 deletions

View file

@ -1759,8 +1759,8 @@ export class Interpreter<R> {
: self.toPropertyKey(yield* self.evaluateExpression(propertyNode), propertyNode)
if (objectValue instanceof ToolReference) {
if (typeof key !== "string" || isBlockedMember(key)) {
throw new InterpreterRuntimeError("Tool paths must use safe string property names.", propertyNode)
if (typeof key !== "string") {
throw new InterpreterRuntimeError("Tool paths must use string property names.", propertyNode)
}
return new ToolReference([...objectValue.path, key])
}