Skip to content

Commit c868fc2

Browse files
map to task corerctly
1 parent 6d0b9ef commit c868fc2

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

src/observability/promptClient.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ class PromptClient {
8484
content: response.content,
8585
version: response.version,
8686
versionId: response.version_id,
87+
taskId: response.task_id || null,
8788
promptSlug: response.prompt || null,
8889
tag: response.tag,
8990
isLatest: response.is_latest,

src/prompt.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,9 @@ export async function prompt(options: PromptOptions): Promise<string> {
142142
}
143143

144144
// Build metadata for decoration
145+
// Use the actual task ID from the backend when available; fall back to name
145146
const metadata: PromptMetadata = {
146-
task: name,
147+
task: promptObj.taskId || name,
147148
};
148149

149150
if (variables && Object.keys(variables).length > 0) {

src/types/prompt.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*/
55
export interface PromptResponse {
66
prompt: string; // prompt slug
7+
task_id: string | null; // actual task UUID from backend
78
version_id: string;
89
version: number;
910
tag: string | null;
@@ -30,6 +31,7 @@ export interface Prompt {
3031
content: string;
3132
version: number | null;
3233
versionId: string | null;
34+
taskId: string | null;
3335
promptSlug: string | null;
3436
tag: string | null;
3537
isLatest: boolean;

0 commit comments

Comments
 (0)