From cbcdd33aa8463da93f63c502358abcf6f710d947 Mon Sep 17 00:00:00 2001 From: gtarpenning Date: Thu, 7 Nov 2024 10:34:51 -0800 Subject: [PATCH] typ --- .../Browse3/pages/wfReactInterface/traceServerClient.ts | 6 +++--- .../pages/wfReactInterface/traceServerClientTypes.ts | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/wfReactInterface/traceServerClient.ts b/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/wfReactInterface/traceServerClient.ts index 227aa90f9f4..fc50a73ffd2 100644 --- a/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/wfReactInterface/traceServerClient.ts +++ b/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/wfReactInterface/traceServerClient.ts @@ -12,7 +12,7 @@ import { TraceRefsReadBatchReq, TraceRefsReadBatchRes, } from './traceServerClientTypes'; -import {DirectTraceServerClient} from './traceServerDirectClient'; +import { DirectTraceServerClient } from './traceServerDirectClient'; const DEFAULT_BATCH_INTERVAL = 150; const MAX_REFS_PER_BATCH = 1000; @@ -110,7 +110,7 @@ export class TraceServerClient extends DirectTraceServerClient { public feedbackCreate(req: FeedbackCreateReq): Promise { const res = super.feedbackCreate(req).then(createRes => { const feedbackRefResolved = - req.payload?.feedback_ref ?? this.FEEDBACK_REF_DEFAULT; + req.annotation_ref ?? this.FEEDBACK_REF_DEFAULT; const listeners = this.onFeedbackListeners[feedbackRefResolved][req.weave_ref] ?? []; listeners.forEach(listener => listener()); @@ -136,7 +136,7 @@ export class TraceServerClient extends DirectTraceServerClient { public feedbackReplace(req: FeedbackReplaceReq): Promise { const res = super.feedbackReplace(req).then(replaceRes => { const feedbackRefResolved = - req.payload?.feedback_ref ?? this.FEEDBACK_REF_DEFAULT; + req.annotation_ref ?? this.FEEDBACK_REF_DEFAULT; const listeners = this.onFeedbackListeners[feedbackRefResolved][req.weave_ref] ?? []; listeners.forEach(listener => listener()); diff --git a/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/wfReactInterface/traceServerClientTypes.ts b/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/wfReactInterface/traceServerClientTypes.ts index 98bff37a822..41d067f081e 100644 --- a/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/wfReactInterface/traceServerClientTypes.ts +++ b/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/wfReactInterface/traceServerClientTypes.ts @@ -1,4 +1,4 @@ -import {Query} from './traceServerClientInterface/query'; +import { Query } from './traceServerClientInterface/query'; type ExtraKeysAllowed = { [key: string]: any; }; @@ -144,6 +144,10 @@ export type FeedbackCreateReq = { weave_ref: string; feedback_type: string; payload: Record; + annotation_ref?: string; + runnable_ref?: string; + call_ref?: string; + trigger_ref?: string; }; export type FeedbackCreateSuccess = {