GeezerVison is showing github.com — refactor(provider-core): replace the unused string override with a bo… · pingdotgg/t3code@50b7a66
File treeExpand file treeCollapse file tree Open diff view settings provider-acp-registry/src/server
Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: apps/server/src/provider/ProviderInstanceRegistry.ts +2-4Lines changed: 2 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -85,7 +85,7 @@ const runtimeEqual = (a: ProviderInstanceConfig, b: ProviderInstanceConfig): boo | 85 | 85 | const withLivePresentation = ( | 86 | 86 | instance: ProviderInstance, | 87 | 87 | created: ProviderInstanceConfig, | 88 | | - defaultSnapshotDisplayName: string | null, | | 88 | + defaultSnapshotDisplayName: string | undefined, | 89 | 89 | ) => { | 90 | 90 | let current = created; | 91 | 91 | const restamp = <S extends ServerProvider>(snapshot: S): S => { | @@ -408,9 +408,7 @@ const buildEntry = Effect.fn("ProviderInstanceRegistry.buildEntry")(function* <R | 408 | 408 | const { instance, setPresentation } = withLivePresentation( | 409 | 409 | createResult.success, | 410 | 410 | entry, | 411 | | - driver.metadata.defaultSnapshotDisplayName === undefined | 412 | | - ? driver.metadata.displayName | 413 | | - : driver.metadata.defaultSnapshotDisplayName, | | 411 | + driver.metadata.snapshotOmitsDisplayName ? undefined : driver.metadata.displayName, | 414 | 412 | ); | 415 | 413 | return { | 416 | 414 | kind: "live" as const, | |
Collapse file Copy file name to clipboardExpand all lines: packages/provider-acp-registry/src/server/driver.ts +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -616,7 +616,7 @@ export const AcpRegistryDriver: ProviderDriver<AcpRegistrySettings, AcpRegistryD | 616 | 616 | driverKind: DRIVER_KIND, | 617 | 617 | metadata: { | 618 | 618 | displayName: "ACP Registry", | 619 | | - defaultSnapshotDisplayName: null, | | 619 | + snapshotOmitsDisplayName: true, | 620 | 620 | supportsMultipleInstances: true, | 621 | 621 | hasDefaultInstance: false, | 622 | 622 | }, | |
Collapse file Copy file name to clipboardExpand all lines: packages/provider-core/src/server/driver.ts +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -25,8 +25,8 @@ import type { ProviderUsageReader } from "./usage.ts"; | 25 | 25 |
| 26 | 26 | export interface ProviderDriverMetadata { | 27 | 27 | readonly displayName: string; | 28 | | - /** Overrides displayName for unlabeled snapshots. Null means the snapshot omits the name. */ | 29 | | - readonly defaultSnapshotDisplayName?: string | null; | | 28 | + /** Unlabeled snapshots leave displayName out instead of reporting this one. */ | | 29 | + readonly snapshotOmitsDisplayName?: boolean; | 30 | 30 | /** Defaults to true; false rejects multiple instances of a global resource. */ | 31 | 31 | readonly supportsMultipleInstances?: boolean; | 32 | 32 | readonly hasDefaultInstance?: boolean; | |
|