@get-bb/plugin-sdk 0.6.89 → 0.6.94

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -133,10 +133,17 @@ interface ExperimentalRpcQueryState<T> {
133
133
  isLoading: boolean;
134
134
  /** A read attempt is active, including background refreshes. Keyed consumers share this activity for their method; offline-paused reads are not fetching. */
135
135
  isFetching: boolean;
136
- /** Force a read regardless of freshness and wait for its attempt/retries. Keyed reads refresh the method's subscribed keys. Failures update error and retain data; this promise resolves rather than rejecting. */
136
+ /** Force a read regardless of freshness and wait for its attempt/retries. Keyed reads refresh only this hook's keys, batched with other hooks refreshing in the same render. Failures update error and retain data; this promise resolves rather than rejecting. */
137
137
  refetch(): Promise<void>;
138
138
  }
139
139
  interface ExperimentalRpcKeyedQueryState<T, Selection = Record<string, T>> extends ExperimentalRpcQueryState<Selection> {
140
+ /**
141
+ * Read these keys again and keep every other loaded row, for retrying one
142
+ * failed row without refreshing the rest. Keys must be among this query's
143
+ * keys; others are ignored. Resolves once the read settles; failures update
144
+ * `error` and retain data.
145
+ */
146
+ refetchKeys(keys: readonly string[]): Promise<void>;
140
147
  }
141
148
  interface ExperimentalRpcQueryOptions<Contract extends PluginRpcContract, Method extends keyof Contract & string> {
142
149
  contract: Contract;
@@ -6,7 +6,7 @@
6
6
  // and read the real source: https://github.com/get-bb/bb
7
7
 
8
8
  import * as _get_bb_plugin_sdk from '@get-bb/plugin-sdk';
9
- import { ExperimentalSidebarFooterItemRegistration, PluginNavPanelRegistration, PluginProviderIconRegistration, PluginHomepageSectionRegistration, PluginSettingsSectionRegistration, ExperimentalAppOverlayRegistration, ExperimentalTabRegistration, PluginNewThreadPanelActionRegistration, ComposerCustomization, PluginPendingInteractionRegistration, PluginSidebarFooterActionRegistration, PluginThreadListRegistration, ExperimentalSidebarNavigationRegistration, PluginThreadHeaderActionRegistration, ExperimentalThreadContextSegmentRegistration, ExperimentalThreadInfoRowRegistration, ExperimentalThreadInfoSectionRegistration, PluginThreadActionRegistration, ExperimentalPluginBrowserToolbarActionRegistration, PluginFileOpenerRegistration, PluginSourceCodeRendererRegistration, PluginDiffRendererRegistration, ExperimentalComposerRegistration, PluginMessageDirectiveRegistration, ExperimentalCodeFenceRendererRegistration, PluginMessageActionRegistration, ExperimentalIconRegistration, PluginTimelineRendererRegistration, PluginEnvironmentProviderInputsRegistration, PluginMachineProviderInputsRegistration, PluginContentScriptRegistration, ComposerDraftSnapshot, PluginComposerScope, ComposerSelection, PluginComposerTextEffect, PluginComposerMention, ComposerSubmitOptions, ExperimentalClipboardContent, PluginComposerThreadRowStatus, BbNavigate, ExperimentalFileOpenOptions, PluginAppDefinition, PluginRpcContract, StandardSchemaV1InferInput, PluginRpcResult, PluginBrowserBbSdk, PluginRealtimeConnectionState, ComposerMention, ComposerAttachment, PluginSidebarThreadsState, PluginProvidersState, PluginCodeThemeState, BranchesState, CheckoutState, PluginSidebarThreadRowStatus, PluginSidebarThreadShortcut, PluginSidebarSplitLayout, ExperimentalComposerRendererApi, ExperimentalSidebarNavigationItem, PluginThreadActionTarget, PluginThreadActionEntry, PluginThreadActionRegistrationInfo, PluginEnvironmentProvidersState, ExperimentalLiveFileTarget, ExperimentalPanelController, JsonValue, ExperimentalPageTitle, ExperimentalOpenTabOptions, ExperimentalSidebarNavigationActions, ExperimentalSidebarNavigationTarget } from '@get-bb/plugin-sdk';
9
+ import { ExperimentalSidebarFooterItemRegistration, PluginNavPanelRegistration, PluginProviderIconRegistration, PluginHomepageSectionRegistration, PluginSettingsSectionRegistration, ExperimentalAppOverlayRegistration, ExperimentalTabRegistration, PluginNewThreadPanelActionRegistration, ComposerCustomization, PluginPendingInteractionRegistration, PluginSidebarFooterActionRegistration, PluginThreadListRegistration, ExperimentalSidebarNavigationRegistration, ExperimentalThreadContextSegmentRegistration, ExperimentalThreadInfoRowRegistration, ExperimentalThreadRowMetadataRegistration, ExperimentalThreadInfoSectionRegistration, PluginThreadActionRegistration, ExperimentalPluginBrowserToolbarActionRegistration, PluginFileOpenerRegistration, PluginSourceCodeRendererRegistration, PluginDiffRendererRegistration, ExperimentalComposerRegistration, PluginMessageDirectiveRegistration, ExperimentalCodeFenceRendererRegistration, PluginMessageActionRegistration, ExperimentalIconRegistration, PluginTimelineRendererRegistration, PluginEnvironmentProviderInputsRegistration, PluginMachineProviderInputsRegistration, PluginContentScriptRegistration, ComposerDraftSnapshot, PluginComposerScope, ComposerSelection, PluginComposerTextEffect, PluginComposerMention, ComposerSubmitOptions, ExperimentalClipboardContent, PluginComposerThreadRowStatus, BbNavigate, ExperimentalFileOpenOptions, PluginAppDefinition, PluginRpcContract, StandardSchemaV1InferInput, PluginRpcResult, PluginBrowserBbSdk, PluginRealtimeConnectionState, ComposerMention, ComposerAttachment, PluginSidebarThreadsState, PluginProvidersState, PluginCodeThemeState, BranchesState, CheckoutState, PluginSidebarThreadRowStatus, PluginSidebarThreadShortcut, PluginSidebarSplitLayout, ExperimentalComposerRendererApi, ExperimentalSidebarNavigationItem, PluginThreadActionTarget, PluginThreadActionEntry, PluginThreadActionRegistrationInfo, PluginEnvironmentProvidersState, ExperimentalLiveFileTarget, ExperimentalPanelController, JsonValue, ExperimentalPageTitle, ExperimentalOpenTabOptions, ExperimentalSidebarNavigationActions, ExperimentalSidebarNavigationTarget } from '@get-bb/plugin-sdk';
10
10
  import { ComponentType, ReactNode } from 'react';
11
11
  import { RenderResult } from '@testing-library/react';
12
12
 
@@ -34,6 +34,16 @@ interface LegacyThreadPanelActionRegistration {
34
34
  layout?: "flush" | "padded";
35
35
  run?(context: _get_bb_plugin_sdk.ExperimentalThreadTabActionContext): void | Promise<void>;
36
36
  }
37
+ interface LegacyThreadHeaderActionProps {
38
+ threadId: string;
39
+ projectId: string;
40
+ isCompactViewport: boolean;
41
+ }
42
+ interface LegacyThreadHeaderActionRegistration {
43
+ id: string;
44
+ title: string;
45
+ component: ComponentType<LegacyThreadHeaderActionProps>;
46
+ }
37
47
  type LegacyNavPanelRegistration = PluginNavPanelRegistration & {
38
48
  fixedTabs?: readonly PluginNavPanelFixedTabRegistration[];
39
49
  };
@@ -225,9 +235,10 @@ interface CapturedPluginApp {
225
235
  experimentalSidebarFooterItems: CollectedExperimentalSidebarFooterItem[];
226
236
  threadLists: PluginThreadListRegistration[];
227
237
  experimentalSidebarNavigations: ExperimentalSidebarNavigationRegistration[];
228
- threadHeaderActions: PluginThreadHeaderActionRegistration[];
238
+ threadHeaderActions: LegacyThreadHeaderActionRegistration[];
229
239
  threadContextSegments: ExperimentalThreadContextSegmentRegistration[];
230
240
  threadInfoRows: ExperimentalThreadInfoRowRegistration[];
241
+ threadRowMetadata: ExperimentalThreadRowMetadataRegistration<unknown>[];
231
242
  threadInfoSections: ExperimentalThreadInfoSectionRegistration[];
232
243
  threadActions: PluginThreadActionRegistration<unknown>[];
233
244
  browserToolbarActions: ExperimentalPluginBrowserToolbarActionRegistration[];
@@ -439,6 +450,11 @@ interface RenderSlotOptions<Contract extends PluginRpcContract = PluginRpcContra
439
450
  * false for every target.
440
451
  */
441
452
  canOpenFileExternally?: (target: ExperimentalLiveFileTarget) => boolean;
453
+ /**
454
+ * Answer for `experimental_useTabVisible()`. Omitted → true, as for a tab
455
+ * that is selected in an open panel.
456
+ */
457
+ tabVisible?: boolean;
442
458
  /** Host acceptance for `useBbNavigate().experimental_openTerminal`. */
443
459
  openTerminal?: (options: Parameters<BbNavigate["experimental_openTerminal"]>[0]) => boolean;
444
460
  /**