GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(gui): strictly type webSearch sidecar setting and patch to WebSea… · lidge-jun/opencodex@80e4ab0

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • gui/src/pages
    • dashboard-overview-sections.tsx
    • dashboard-shared.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎gui/src/pages/dashboard-overview-sections.tsx‎

Copy file name to clipboardExpand all lines: gui/src/pages/dashboard-overview-sections.tsx
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,8 @@ export function DashboardSidecarPanels({ d }: { d: Dash }) {
517517
options={sidecarModels}
518518
onChange={model => {
519519
const backend = sidecarBackendForModel(models, model);
520-
void saveSidecar({ webSearch: { model, ...(backend === "unresolved" ? {} : { backend }) } });
520+
const webSearchBackend = backend === "openai" || backend === "anthropic" ? backend : undefined;
521+
void saveSidecar({ webSearch: { model, ...(webSearchBackend ? { backend: webSearchBackend } : {}) } });
521522
}}
522523
disabled={!sidecar || sidecarSaving}
523524
label={t("dash.sidecarModel")}
Collapse file

‎gui/src/pages/dashboard-shared.ts‎

Copy file name to clipboardExpand all lines: gui/src/pages/dashboard-shared.ts
+7-7Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ export type SidecarBackend = "openai" | "anthropic" | "chat";
6363
/** Web-search sidecars accept only OpenAI/Anthropic — `chat` is vision-only. */
6464
export type WebSearchBackend = "openai" | "anthropic";
6565
export type VisionReasoning = "low" | "medium" | "high" | "xhigh" | "max";
66-
export interface SidecarSetting {
67-
backend?: SidecarBackend;
66+
export interface SidecarSetting<B extends SidecarBackend = SidecarBackend> {
67+
backend?: B;
6868
model: string;
6969
reasoning?: VisionReasoning;
7070
streamRoutedModelOutput?: boolean;
@@ -74,7 +74,7 @@ export interface SidecarSetting {
7474
}
7575
export interface VisionModelOption { value: string; label: string; backend: SidecarBackend; baseline?: boolean }
7676
export interface SidecarData {
77-
webSearch: Omit<SidecarSetting, "backend"> & { backend?: WebSearchBackend };
77+
webSearch: SidecarSetting<WebSearchBackend>;
7878
vision: SidecarSetting;
7979
/** Server-computed eligible describers. Optional: an older server omits it and
8080
* the client falls back to the legacy provider-name list rather than showing
@@ -171,18 +171,18 @@ export function updateJobLabel(status: UpdateJobStatus, t: (key: TKey) => string
171171
}
172172
}
173173

174-
export function mergeSidecarSetting(
175-
current: SidecarSetting,
174+
export function mergeSidecarSetting<B extends SidecarBackend = SidecarBackend>(
175+
current: SidecarSetting<B>,
176176
update?: {
177-
backend?: SidecarBackend | null;
177+
backend?: B | null;
178178
model?: string;
179179
reasoning?: VisionReasoning;
180180
streamRoutedModelOutput?: boolean;
181181
enabled?: boolean;
182182
maxDescriptionsPerTurn?: number;
183183
timeoutMs?: number;
184184
},
185-
): SidecarSetting {
185+
): SidecarSetting<B> {
186186
const merged = { ...current };
187187
if (update?.model !== undefined) merged.model = update.model;
188188
if (update?.backend === null) delete merged.backend;

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.