We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4f396c7 commit e583e5bCopy full SHA for e583e5b
1 file changed
packages/trigger-sdk/src/v3/prompt.ts
@@ -3,7 +3,6 @@ import {
3
apiClientManager,
4
resourceCatalog,
5
SemanticInternalAttributes,
6
- taskContext,
7
type PromptMetadataWithFunctions,
8
type TaskSchema,
9
type inferSchemaIn,
@@ -154,11 +153,10 @@ export function definePrompt<TVariables extends TaskSchema | undefined = undefin
154
153
: variables;
155
const vars = validated as Record<string, unknown>;
156
157
- const ctx = taskContext.ctx;
158
const apiClient = apiClientManager.client;
159
160
- // If we're running inside a task on the platform, resolve via the API
161
- if (ctx && apiClient) {
+ // Resolve via the API when a client is configured (inside tasks or via configure())
+ if (apiClient) {
162
const response = await apiClient.resolvePrompt(
163
options.id,
164
{
0 commit comments