From 100d145211434509e98ee6bac6beac7cf24acdd9 Mon Sep 17 00:00:00 2001 From: Griffin Tarpenning Date: Wed, 22 Jan 2025 14:53:35 -0800 Subject: [PATCH 1/2] chore(weave): fix object delete typing (#3468) --- .../Browse3/pages/wfReactInterface/traceServerClientTypes.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 28a6eb72c1ca..31b6e95b88f2 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 @@ -256,12 +256,11 @@ export type TraceObjCreateRes = { export type TraceObjDeleteReq = { project_id: string; object_id: string; - digests: string[]; + digests?: string[]; }; export type TraceObjDeleteRes = { num_deleted?: number; - detail?: string; }; export type TraceRefsReadBatchReq = { From 56024bfcf32e6b0e4f9636ddfc3c63a30e50a6ee Mon Sep 17 00:00:00 2001 From: Griffin Tarpenning Date: Wed, 22 Jan 2025 16:06:18 -0800 Subject: [PATCH 2/2] fix(ui): remove expandColumns with get_calls (#3471) --- .../Browse3/pages/CallsPage/CallsTableButtons.tsx | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/CallsPage/CallsTableButtons.tsx b/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/CallsPage/CallsTableButtons.tsx index 52e31390c85c..0830a9c39238 100644 --- a/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/CallsPage/CallsTableButtons.tsx +++ b/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/CallsPage/CallsTableButtons.tsx @@ -156,12 +156,10 @@ export const ExportSelector = ({ }; const pythonText = makeCodeText( - callQueryParams.entity, callQueryParams.project, selectionState === 'selected' ? selectedCalls : undefined, lowLevelFilter, filterBy, - refColumnsToExpand, sortBy, includeFeedback ); @@ -521,12 +519,10 @@ function makeLeafColumns(visibleColumns: string[]) { } function makeCodeText( - entity: string, project: string, callIds: string[] | undefined, filter: CallFilter, query: Query | undefined, - expandColumns: string[], sortBy: Array<{field: string; direction: 'asc' | 'desc'}>, includeFeedback: boolean ) { @@ -535,15 +531,11 @@ function makeCodeText( const filteredCallIds = callIds ?? filter.callIds; if (filteredCallIds && filteredCallIds.length > 0) { codeStr += ` filter={"call_ids": ["${filteredCallIds.join('", "')}"]},\n`; - if (expandColumns.length > 0) { - const expandColumnsStr = JSON.stringify(expandColumns, null, 0); - codeStr += ` expand_columns=${expandColumnsStr},\n`; - } if (includeFeedback) { codeStr += ` include_feedback=True,\n`; } // specifying call_ids ignores other filters, return early - codeStr += `})`; + codeStr += `)`; return codeStr; } if (Object.values(filter).some(value => value !== undefined)) { @@ -572,10 +564,6 @@ function makeCodeText( if (query) { codeStr += ` query=${JSON.stringify(query, null, 0)},\n`; } - if (expandColumns.length > 0) { - const expandColumnsStr = JSON.stringify(expandColumns, null, 0); - codeStr += ` expand_columns=${expandColumnsStr},\n`; - } if (sortBy.length > 0) { codeStr += ` sort_by=${JSON.stringify(sortBy, null, 0)},\n`;