Skip to content

Commit

Permalink
refactor(js/ai): drop namespace for dotprompt, allow async action reg…
Browse files Browse the repository at this point in the history
…istration, allow action names with slashes (#1662)


---------

Co-authored-by: Michael Bleigh <bleigh@google.com>
pavelgj and mbleigh authored Jan 26, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent bf38029 commit 7cbac3c
Showing 9 changed files with 331 additions and 162 deletions.
2 changes: 0 additions & 2 deletions js/ai/src/generate.ts
Original file line number Diff line number Diff line change
@@ -424,8 +424,6 @@ async function resolveFullToolName(
return `/tool/${name}`;
} else if (await registry.lookupAction(`/prompt/${name}`)) {
return `/prompt/${name}`;
} else if (await registry.lookupAction(`/prompt/dotprompt/${name}`)) {
return `/prompt/dotprompt/${name}`;
} else {
throw new Error(`Unable to determine type of of tool: ${name}`);
}
Loading

0 comments on commit 7cbac3c

Please sign in to comment.