codex-copilot-dx 1.4.2 → 1.4.3
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.
- package/README.md +1 -1
- package/docs/ARCHITECTURE.md +3 -1
- package/docs/REFERENCE.md +5 -4
- package/package.json +1 -1
- package/src/adapter.mjs +4 -0
- package/src/antigravity-chat-bridge.mjs +2 -2
- package/src/antigravity-handler.mjs +1 -1
- package/src/antigravity-models.mjs +19 -10
- package/src/antigravity-runtime.mjs +7 -3
- package/src/cli-command-spec.mjs +2 -2
- package/src/cli-management.mjs +4 -4
- package/src/dashboard/gemini.js +3 -3
- package/src/model-capabilities.mjs +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Use your model services in **Codex App, Claude App and Claude Code** through one local gateway.
|
|
4
4
|
|
|
5
|
-
On macOS, the optional Gemini integration adds Copilot
|
|
5
|
+
On macOS, the optional Gemini integration adds compatible Copilot Gemini models to the original App's Antigravity. Ordinary Gemini chat keeps Google. The Antigravity page lists each model once, with its advertised reasoning levels shown in the same format as Codex and Claude. Refresh the catalog there or with `ccdx app antigravity models --refresh`. Existing clients keep their setup.
|
|
6
6
|
|
|
7
7
|
Connect GitHub Copilot, Microsoft 365 or your own API. Choose which apps can use each source, then select their models. CI and prebuilt releases cover **macOS on Apple Silicon** and **Windows on x64/ARM64**. Intel Mac code remains available, without CI coverage or new prebuilt assets.
|
|
8
8
|
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -34,13 +34,15 @@ or `/antigravity/` routes. Existing inference routes return before that dispatch
|
|
|
34
34
|
|
|
35
35
|
`antigravity-handler.mjs` preserves observed Google account/catalog control
|
|
36
36
|
requests against fixed official Code Assist origins. It merges advertised
|
|
37
|
-
Copilot
|
|
37
|
+
compatible Copilot Gemini aliases while retaining native models and defaults. The catalog drives model names, limits, vision and reasoning aliases, including xhigh; there is no per-model allowlist. Explicit image-only, disabled, non-streaming/non-tool and non-Chat declarations are excluded. Native
|
|
38
38
|
Google agent requests pass through; selected Copilot agents and all unattributed
|
|
39
39
|
background inference use Copilot. Summaries use Carbon Low, searches use the
|
|
40
40
|
existing Copilot search transport, and images use the existing GHC Images API.
|
|
41
41
|
Ordinary Gemini chat is outside this endpoint scope; parent-App route adoption
|
|
42
42
|
and ordinary-chat isolation require native App acceptance beyond engine replay.
|
|
43
43
|
|
|
44
|
+
The existing Antigravity refresh control sends an explicit `refresh` operation through the GitHub catalog runtime. Status and summary reads remain cached. Refresh failures preserve the last-good catalog; selection and draft writes remain separate. `app antigravity models --refresh` shares this boundary. The capability projection also preserves explicit Copilot `vision=false` as text-only while retaining native-template fallback for unknown vision, following [CC Switch's capability fix](https://github.com/farion1231/cc-switch/commit/fc3eb797c72e054d554eea6a2e7a8b93933c6ac5).
|
|
45
|
+
|
|
44
46
|
The Chat bridge keeps lossless tool integers, explicit effort, cancellation,
|
|
45
47
|
stream backpressure, privacy-token restoration and terminal errors. Native
|
|
46
48
|
conversation labels feed the existing source guard before main-answer dispatch.
|
package/docs/REFERENCE.md
CHANGED
|
@@ -70,9 +70,9 @@ inspection. Use `app antigravity status` to check the signed installation explic
|
|
|
70
70
|
The old `app gemini` commands remain available. Authorize Antigravity on the GitHub
|
|
71
71
|
Copilot source page, or with `source github access --edit --apps codex,antigravity --yes`.
|
|
72
72
|
Choose its exposed models on the Antigravity page or with
|
|
73
|
-
`app antigravity models --edit`. Each WebUI row represents one model.
|
|
73
|
+
`app antigravity models --edit`. Each WebUI row represents one model. Compatible Gemini chat models come from the current GitHub catalog, rather than a fixed Carbon/Argon list. The Reasoning column lists advertised levels, including Hydrogen's `xhigh` when available. The model checkbox controls visibility. Save/Discard, refresh, navigation, pausing and an off/on toggle preserve an existing saved route subset. CLI model editing and model files remain available for fine-grained effort selection. Refresh on this page or run `app antigravity models --refresh` to read the upstream catalog through the existing GitHub refresh runtime. Refresh does not change saved choices, save drafts, restart clients or invoke inference; failed reads retain the last usable list.
|
|
74
74
|
|
|
75
|
-
The native Gemini catalog still uses distinct routing aliases for each level so its original selector can choose the intended effort. JSON model output retains those aliases for compatibility, with a `model` field identifying the actual model; the management status also includes `model_groups`. A model file accepts `{"models":["gemini-4-
|
|
75
|
+
The native Gemini catalog still uses distinct routing aliases for each level so its original selector can choose the intended effort. JSON model output retains those aliases for compatibility, with a `model` field identifying the actual model; the management status also includes `model_groups`. A model file accepts `{"models":["gemini-4-hydrogen"]}` to expose all of its advertised levels, or individual `ccdx-copilot-...-<effort>` aliases to choose a subset. Existing Carbon/Argon aliases remain valid. Models without declared reasoning levels use one plain alias.
|
|
76
76
|
After saving, the Antigravity page reports whether the client has fetched the current model list. If the list is pending, reopen Gemini through CCDX.
|
|
77
77
|
|
|
78
78
|
The WebUI uses one authorization form for GitHub Copilot, Microsoft 365 and custom APIs. Source switches apply immediately. App-authorization and model checkboxes are drafts until **Save**; **Discard changes** restores the saved selection. Drafts survive refresh and navigation. Source authorization does not choose app models.
|
|
@@ -81,14 +81,15 @@ Pausing Antigravity Copilot access retains its saved model selection. Native Goo
|
|
|
81
81
|
|
|
82
82
|
The page distinguishes enabled access from an observed client connection.
|
|
83
83
|
|
|
84
|
-
|
|
85
|
-
Copilot account advertises them. Google models, account controls and defaults
|
|
84
|
+
Compatible Gemini models and their declared reasoning levels appear when the Copilot account advertises them. Image-only models, incompatible interfaces and explicitly unavailable models are excluded. Google models, account controls and defaults
|
|
86
85
|
are retained. Conversations keep their initial Google/Copilot source; start a
|
|
87
86
|
new conversation to change source. Unsupported PDF, audio and video inputs are refused
|
|
88
87
|
before Copilot dispatch. Text, inline images and native function tools are
|
|
89
88
|
converted to the advertised Copilot Chat interface; truncated streams report an
|
|
90
89
|
error rather than successful completion.
|
|
91
90
|
|
|
91
|
+
This Copilot selection does not restrict Antigravity's original Google model directory. Google wire IDs such as `gemini-3.8-flash-tiered` can therefore appear in usage without being CCDX-added model choices. The recorded provider distinguishes Google and GitHub Copilot; the ID alone does not establish a background task or a fallback. Known conversation compaction retains its observed source and model.
|
|
92
|
+
|
|
92
93
|
`enable` saves CCDX settings and prepares its local source guard. `open --preview` shows the launch plan.
|
|
93
94
|
`open` starts a closed, signed `/Applications/Gemini.app` with a process-local
|
|
94
95
|
Antigravity endpoint. An already running App is kept open and must be quit by
|
package/package.json
CHANGED
package/src/adapter.mjs
CHANGED
|
@@ -193,6 +193,10 @@ export function createAdapterHandler(options = {}) {
|
|
|
193
193
|
if (!antigravityLoading) antigravityLoading = (async () => {
|
|
194
194
|
const { createAntigravityRuntime } = await import("./antigravity-runtime.mjs");
|
|
195
195
|
antigravity = createAntigravityRuntime({ client: codexClient, models: () => codexModelRegistry?.models || [], privacy, compaction, acquireRequest,
|
|
196
|
+
...(options.providerRuntime?.dashboardCatalog?{refreshModels:async()=>{
|
|
197
|
+
const result=await options.providerRuntime.dashboardCatalog({provider:"github"});
|
|
198
|
+
if(!result)throw httpError("GitHub model catalog refresh is unavailable",503);
|
|
199
|
+
}}:{}),
|
|
196
200
|
env: options.env, home: options.dashboardOptions?.home, requestBodyTimeoutMs, upstreamTimeoutMs, streamIdleTimeoutMs,
|
|
197
201
|
...options.antigravityOptions });
|
|
198
202
|
return antigravity;
|
|
@@ -53,7 +53,7 @@ function contentValue(parts) {
|
|
|
53
53
|
return parts.length === 1 && parts[0].type === "text" ? parts[0].text : parts;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
export function antigravityToChat(request, { model, effort, stream = true } = {}) {
|
|
56
|
+
export function antigravityToChat(request, { model, effort, stream = true, reasoningEfforts = ["none","minimal","low","medium","high","xhigh","max"] } = {}) {
|
|
57
57
|
if (!object(request) || !Array.isArray(request.contents) || typeof model !== "string" || !model)
|
|
58
58
|
throw invalid("Invalid Gemini generation request");
|
|
59
59
|
if (Object.keys(request).some(key => !["contents", "systemInstruction", "tools", "toolConfig", "generationConfig", "labels", "sessionId"].includes(key))
|
|
@@ -143,7 +143,7 @@ export function antigravityToChat(request, { model, effort, stream = true } = {}
|
|
|
143
143
|
// A CCDX model alias advertises the Copilot effort selected in the App.
|
|
144
144
|
// Its explicit effort takes precedence over Google's internal token budget.
|
|
145
145
|
const level = effort || generation.thinkingConfig?.thinkingLevel?.toLowerCase();
|
|
146
|
-
if (level && !
|
|
146
|
+
if (level && !reasoningEfforts.includes(level)) throw invalid("Unsupported Gemini reasoning level");
|
|
147
147
|
const chat = { model, messages, stream,
|
|
148
148
|
...(stream ? { stream_options: { include_usage: true } } : {}),
|
|
149
149
|
...(tools.length ? { tools, tool_choice: choices[mode] } : {}),
|
|
@@ -169,7 +169,7 @@ export function createAntigravityHandler({client,models=()=>[],selectedModels=()
|
|
|
169
169
|
const target=body.requestType==="agent"||compactBinding&&!compactBinding.background?selected:copilotModels.find(model=>model.model==="gemini-4-carbon"&&model.effort==="low");
|
|
170
170
|
if(!target)throw httpError("Copilot Carbon is unavailable for Antigravity background tasks",503);
|
|
171
171
|
const stream=method==="streamGenerateContent";usageModel=target.model;usageMode=stream?"sse":"json";usageProvider="github";
|
|
172
|
-
const converted=antigravityToChat(request,{model:target.model,effort:target.effort,stream});
|
|
172
|
+
const converted=antigravityToChat(request,{model:target.model,effort:target.effort,reasoningEfforts:target.effort?[target.effort]:[],stream});
|
|
173
173
|
markResponseModel(target.model);markRequestObservation({usage_state:"pending"});
|
|
174
174
|
session=privacy?.prepareSession?await privacy.prepareSession(converted.chat,{protocol:"chat",client:"gemini",signal:abort.signal}):passthrough(converted.chat);
|
|
175
175
|
const callOptions={signal:abort.signal,retryOptions:{retries:0},onUpstreamStart:()=>abort.setTimeout(upstreamTimeoutMs,"upstream_timeout")};
|
|
@@ -1,16 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import {uniqueModelEntries} from "./model-catalog.mjs";
|
|
2
|
+
import {modelDisplayName} from "./model-display.mjs";
|
|
3
|
+
import {modelReasoningEfforts} from "./provider-metadata.mjs";
|
|
3
4
|
export const ANTIGRAVITY_MODEL_PREFIX = "ccdx-copilot-";
|
|
4
5
|
|
|
5
6
|
export function antigravityCopilotModels(catalog) {
|
|
6
7
|
const data=Array.isArray(catalog)?catalog:catalog?.data;
|
|
7
|
-
return (data
|
|
8
|
-
.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
return uniqueModelEntries(Array.isArray(data)?data:[]).filter(model=>/^gemini-[a-z0-9][a-z0-9._-]{0,100}$/.test(model?.id)
|
|
9
|
+
&&model.model_picker_enabled!==false&&(!model.policy?.state||model.policy.state==="enabled")
|
|
10
|
+
&&(!model.capabilities?.type||model.capabilities.type==="chat")
|
|
11
|
+
&&model.capabilities?.supports?.streaming!==false&&model.capabilities?.supports?.tool_calls!==false
|
|
12
|
+
&&model.supported_endpoints?.some(endpoint=>["/chat/completions","/v1/chat/completions"].includes(endpoint)))
|
|
13
|
+
.flatMap(model=>{
|
|
14
|
+
const efforts=modelReasoningEfforts(model)||[],fallback=model.id.split("-").map(word=>word[0].toUpperCase()+word.slice(1)).join(" ");
|
|
15
|
+
const name=modelDisplayName({...model,name:model.name||fallback}),label=/gemini/i.test(name)?name:"Gemini · "+name;
|
|
16
|
+
return (efforts.length?efforts:[null]).map(effort=>({
|
|
17
|
+
id:ANTIGRAVITY_MODEL_PREFIX+model.id+(effort?"-"+effort:""),model:model.id,effort,
|
|
18
|
+
displayName:label+" · Copilot"+(effort?" ("+effort[0].toUpperCase()+effort.slice(1)+")":""),
|
|
19
|
+
maxTokens:model.capabilities?.limits?.max_context_window_tokens,maxOutputTokens:model.capabilities?.limits?.max_output_tokens,
|
|
20
|
+
supportsImages:model.capabilities?.supports?.vision===true,
|
|
21
|
+
}));
|
|
22
|
+
});
|
|
14
23
|
}
|
|
15
24
|
|
|
16
25
|
export function mergeAntigravityModels(googleCatalog,copilotCatalog,selection=null) {
|
|
@@ -23,7 +32,7 @@ export function mergeAntigravityModels(googleCatalog,copilotCatalog,selection=nu
|
|
|
23
32
|
if(next>=600||Object.hasOwn(models,entry.id))throw new Error("Antigravity model catalog has no free client identifiers");
|
|
24
33
|
const model="MODEL_PLACEHOLDER_M"+next++;used.add(model);
|
|
25
34
|
models[entry.id]={displayName:entry.displayName,model,maxTokens:entry.maxTokens,maxOutputTokens:entry.maxOutputTokens,
|
|
26
|
-
supportsImages:entry.supportsImages,supportsThinking:
|
|
35
|
+
supportsImages:entry.supportsImages,supportsThinking:Boolean(entry.effort),apiProvider:"API_PROVIDER_GOOGLE_GEMINI"};
|
|
27
36
|
}
|
|
28
37
|
const sorts=googleCatalog.agentModelSorts?.length?structuredClone(googleCatalog.agentModelSorts):[{displayName:"Recommended",groups:[]}];
|
|
29
38
|
// Gemini App reads only the first group in the Recommended sort.
|
|
@@ -21,7 +21,7 @@ import {antigravityCopilotModels} from "./antigravity-models.mjs";
|
|
|
21
21
|
|
|
22
22
|
const execute=promisify(execFile),key="gemini_antigravity_enabled",modelKey="gemini_antigravity_models";
|
|
23
23
|
|
|
24
|
-
export function createAntigravityRuntime({client,models=()=>[],privacy,home=os.homedir(),env=process.env,inspect=inspectGeminiApp,
|
|
24
|
+
export function createAntigravityRuntime({client,models=()=>[],refreshModels,privacy,home=os.homedir(),env=process.env,inspect=inspectGeminiApp,
|
|
25
25
|
exec=execute,searchFn,imageFn,guardSource,googleFetch,acquireRequest,readToken=()=>readSavedGithubToken(home),...timeouts}={}) {
|
|
26
26
|
const options={home,env},guard=createConversationSourceGuard(options);
|
|
27
27
|
const web=searchFn?null:createCopilotWeb({client,readToken});
|
|
@@ -35,7 +35,7 @@ export function createAntigravityRuntime({client,models=()=>[],privacy,home=os.h
|
|
|
35
35
|
const settings=()=>{
|
|
36
36
|
const saved=readUserSettings({...options,strict:true});
|
|
37
37
|
if(saved[key]!==undefined&&typeof saved[key]!=="boolean")throw httpError("Invalid Gemini integration setting",409);
|
|
38
|
-
if(saved[modelKey]!==undefined&&(!Array.isArray(saved[modelKey])||saved[modelKey].length>100||new Set(saved[modelKey]).size!==saved[modelKey].length||saved[modelKey].some(id=>typeof id!=="string"||!/^ccdx-copilot-[a-z0-9-]{1,140}$/.test(id))))throw httpError("Invalid Antigravity model selection",409);
|
|
38
|
+
if(saved[modelKey]!==undefined&&(!Array.isArray(saved[modelKey])||saved[modelKey].length>100||new Set(saved[modelKey]).size!==saved[modelKey].length||saved[modelKey].some(id=>typeof id!=="string"||!/^ccdx-copilot-[a-z0-9._-]{1,140}$/.test(id))))throw httpError("Invalid Antigravity model selection",409);
|
|
39
39
|
return {configured:Object.hasOwn(saved,key),enabled:saved[key]===true,selected_models:saved[modelKey]??null};
|
|
40
40
|
};
|
|
41
41
|
const available=()=>settings().enabled&&readAccessSettings(options).providers.github?models():[];
|
|
@@ -77,8 +77,12 @@ export function createAntigravityRuntime({client,models=()=>[],privacy,home=os.h
|
|
|
77
77
|
async function action(input={},baseUrl){
|
|
78
78
|
if(input&&Object.keys(input).some(name=>!["action","accept_background_copilot","models"].includes(name)))throw httpError("Invalid Gemini operation",400);
|
|
79
79
|
const operation=input.action||"status";
|
|
80
|
-
if(!["status","summary","models","enable","disable","open","preview"].includes(operation))throw httpError("Unknown Gemini operation",400);
|
|
80
|
+
if(!["status","summary","refresh","models","enable","disable","open","preview"].includes(operation))throw httpError("Unknown Gemini operation",400);
|
|
81
81
|
if(input.models!==undefined&&operation!=="models")throw httpError("Models require the models operation",400);
|
|
82
|
+
if(operation==="refresh"){
|
|
83
|
+
if(!refreshModels)throw httpError("Antigravity model refresh is unavailable in this service",503);
|
|
84
|
+
await refreshModels();lastOperation={action:operation,status:"models_refreshed"};
|
|
85
|
+
}
|
|
82
86
|
if(operation==="models"){
|
|
83
87
|
const ids=input.models,known=new Set(antigravityCopilotModels(models()).map(model=>model.id));
|
|
84
88
|
if(!Array.isArray(ids)||ids.length>100||new Set(ids).size!==ids.length||ids.some(id=>!known.has(id)))throw httpError("Choose available Antigravity models",400);
|
package/src/cli-command-spec.mjs
CHANGED
|
@@ -110,7 +110,7 @@ export const MANAGED_COMMANDS = [
|
|
|
110
110
|
),
|
|
111
111
|
command("app list", "List client configuration and observed activity", read),
|
|
112
112
|
...["gemini", "antigravity"].flatMap(app => ["status", "models", "enable", "disable", "open"].map(action => command(`app ${app} ${action}`,
|
|
113
|
-
({status:"Inspect Gemini App and Antigravity setup",models:"List Copilot models
|
|
113
|
+
({status:"Inspect Gemini App and Antigravity setup",models:"List compatible Copilot models for Antigravity",enable:"Enable Antigravity routing and Copilot background requests",disable:"Pause Antigravity Copilot access; reopen Gemini for native routing",open:"Open the original Gemini App with its prepared route"})[action], {...read,...confirm,...(action==="models"?{"--edit":"flag","--file":"value","--refresh":"flag"}:{})}))),
|
|
114
114
|
command("app <app> status", "Show configuration, not process liveness", { ...read, "--details": "flag" }),
|
|
115
115
|
command("app <app> models", "Show or edit the client's selected model plan", {
|
|
116
116
|
...read,
|
|
@@ -288,7 +288,7 @@ export function parseManagedCommand(args) {
|
|
|
288
288
|
const extras = {
|
|
289
289
|
source:
|
|
290
290
|
"Status reads local/cached evidence. check/--refresh may contact the source; no inference.\nsource import --file FILE previews supplied metadata. --select N --apply saves one source using private key input; no client access is granted.\nSource access grants do not select client models. Disable previews affected clients.\nGitHub login and company-account selection are source-specific.\nChoose visible models and defaults with app <app> models --edit.",
|
|
291
|
-
app: "Configured is not App adoption or process liveness. Unknown stays unknown.\nmodels shows the selected plan;
|
|
291
|
+
app: "Configured is not App adoption or process liveness. Unknown stays unknown.\nmodels shows the selected plan; Antigravity lists compatible Copilot models and their selection.\napp antigravity models --refresh reads the GitHub catalog without inference or changing saved choices.\nsource <id> models shows the upstream catalog.\nsetup/remove changes integration setup; pause/resume retains credentials.\nsync --preview shows the model/configuration plan, not a byte-level file diff.\nNo client program is force-restarted.",
|
|
292
292
|
config:
|
|
293
293
|
"Only service and terminal preferences are in scope. Browser appearance stays in WebUI.\nReset keeps accounts, keys, model plans and chats and stores a pre-reset backup.\nSaved and effective values can differ; restart requirements remain explicit.",
|
|
294
294
|
requests:
|
package/src/cli-management.mjs
CHANGED
|
@@ -225,7 +225,7 @@ export async function runManagementCommand(command, options = {}) {
|
|
|
225
225
|
output.write(print(preview) + "\n");await confirm(action === "enable" ? "Enable this Antigravity-only routing scope?" : "Pause Copilot access? Reopen Gemini afterward to restore its native route.");
|
|
226
226
|
}
|
|
227
227
|
if(action==="models"&&flags.edit){
|
|
228
|
-
const state=await request({path:"gemini"});
|
|
228
|
+
const state=await request({path:"gemini",...(flags.refresh?{body:{action:"refresh"},timeoutMs:20000}:{})});
|
|
229
229
|
let ids;
|
|
230
230
|
if(flags.file){
|
|
231
231
|
const listed=readFile().models;if(!Array.isArray(listed))throw new Error("Model files require a models array.");
|
|
@@ -236,7 +236,7 @@ export async function runManagementCommand(command, options = {}) {
|
|
|
236
236
|
ids=[];
|
|
237
237
|
for(const index of selected){
|
|
238
238
|
const model=groups[index],previous=model.efforts.flatMap((item,i)=>item.selected?[i]:[]);
|
|
239
|
-
const efforts=await choose(model.efforts.map(item=>model.name+" / "+item.effort),previous.length?previous:model.efforts.map((_,i)=>i));
|
|
239
|
+
const efforts=await choose(model.efforts.map(item=>model.name+" / "+(item.effort||"default")),previous.length?previous:model.efforts.map((_,i)=>i));
|
|
240
240
|
ids.push(...efforts.map(i=>model.efforts[i].id));
|
|
241
241
|
}
|
|
242
242
|
}else ids=(await choose(state.models.map(model=>model.name),state.models.flatMap((model,index)=>model.selected!==false?[index]:[]))).map(index=>state.models[index].id);
|
|
@@ -245,9 +245,9 @@ export async function runManagementCommand(command, options = {}) {
|
|
|
245
245
|
await confirm("Save Antigravity model selection? Reopen Gemini afterward to reload it.");
|
|
246
246
|
return print(await request({path:"gemini",body:{action:"models",models:ids}}));
|
|
247
247
|
}
|
|
248
|
-
const state = await request({ path: "gemini", ...(["status", "models"].includes(action) ? {} : { body: { action: flags.preview ? "preview" : action, ...(action === "enable" ? { accept_background_copilot: true } : {}) }, timeoutMs: 20000 }) });
|
|
248
|
+
const state = await request({ path: "gemini", ...(action==="models"&&flags.refresh?{body:{action:"refresh"},timeoutMs:20000}:["status", "models"].includes(action) ? {} : { body: { action: flags.preview ? "preview" : action, ...(action === "enable" ? { accept_background_copilot: true } : {}) }, timeoutMs: 20000 }) });
|
|
249
249
|
if(action==="models"&&flags.format!=="json"&&state.model_groups)return print(state.model_groups.map(model=>({model:model.name,id:model.id,source:"GitHub Copilot",context:model.context_window,
|
|
250
|
-
efforts:model.efforts.map(item=>item.effort+(item.selected?" ✓":"")).join(" / ")})),[["model","Model"],["id","ID"],["source","Source"],["context","Context"],["efforts","Reasoning (selected ✓)"]]);
|
|
250
|
+
efforts:model.efforts.map(item=>(item.effort||"default")+(item.selected?" ✓":"")).join(" / ")})),[["model","Model"],["id","ID"],["source","Source"],["context","Context"],["efforts","Reasoning (selected ✓)"]]);
|
|
251
251
|
return print(action === "models" ? state.models : state);
|
|
252
252
|
}
|
|
253
253
|
const graph = await connection(), snapshot = (await readStatus()).data, view = projectTerminalState(snapshot);
|
package/src/dashboard/gemini.js
CHANGED
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
label.append(input,document.createTextNode(model.name));name.append(label);row.append(name);
|
|
42
42
|
for(const [key,value]of [['source','GitHub Copilot'],['cap_context',count(model.context_window)]]){const cell=document.createElement('td');cell.textContent=value;cell.dataset.label=language.format(key);row.append(cell)}
|
|
43
43
|
const efforts=document.createElement('td');efforts.dataset.label=language.format('cap_reasoning');
|
|
44
|
-
efforts.textContent=model.efforts.map(item=>item.effort).join(' / ');
|
|
44
|
+
efforts.textContent=model.efforts.map(item=>item.effort||'—').join(' / ');
|
|
45
45
|
row.append(efforts);list.append(row);
|
|
46
46
|
}
|
|
47
47
|
if(!state.models.length){const row=document.createElement('tr'),cell=document.createElement('td');cell.colSpan=4;language.set(cell,'gemini_no_models');row.append(cell);list.append(row)}
|
|
@@ -70,8 +70,8 @@
|
|
|
70
70
|
el('gemini-model-form').addEventListener('submit',event=>{event.preventDefault();if(dirty())void load('models',{models:draft})});
|
|
71
71
|
el('gemini-cancel').addEventListener('click',()=>{draft=null;notice=null;clear('gemini-note');render()});
|
|
72
72
|
el('gemini-open').addEventListener('click',()=>void load('open'));
|
|
73
|
-
el('gemini-refresh').addEventListener('click',()=>void load());
|
|
74
|
-
el('refresh').addEventListener('click',()=>{if(['#gemini','#models'].includes(location.hash))void load(location.hash==='#models'?'summary':
|
|
73
|
+
el('gemini-refresh').addEventListener('click',()=>void load('refresh'));
|
|
74
|
+
el('refresh').addEventListener('click',()=>{if(['#gemini','#models'].includes(location.hash))void load(location.hash==='#models'?'summary':'refresh')});
|
|
75
75
|
window.addEventListener('hashchange',()=>{if(['#gemini','#models'].includes(location.hash))void load(location.hash==='#models'?'summary':undefined)});
|
|
76
76
|
new MutationObserver(render).observe(document.documentElement,{attributes:true,attributeFilter:['lang']});
|
|
77
77
|
void load(location.hash==='#gemini'?undefined:'summary');
|
|
@@ -40,7 +40,7 @@ export function catalogCapabilities(model) {
|
|
|
40
40
|
max_tool_definitions: first(model.max_tool_definitions, window.max_tool_definitions),
|
|
41
41
|
reasoning: first(typeof caps.reasoning === "boolean" ? caps.reasoning : undefined, supports.reasoning),
|
|
42
42
|
reasoning_efforts: first(model.reasoning_efforts, supports.reasoning_effort),
|
|
43
|
-
input_modalities: first(model.input_modalities, caps.input_modalities, supports.vision ===
|
|
43
|
+
input_modalities: first(model.input_modalities, caps.input_modalities, typeof supports.vision === "boolean" ? supports.vision ? ["text", "image"] : ["text"] : undefined),
|
|
44
44
|
tools: first(supports.tools, supports.tool_calls), parallel_tools: supports.parallel_tool_calls, streaming: supports.streaming, mid_conversation_system: supports.mid_conversation_system,
|
|
45
45
|
structured_output: first(supports.structured_output, supports.structured_outputs), web_search: first(model.web_search, caps.web_search), thinking_modes: first(model.thinking_modes, caps.thinking_modes),
|
|
46
46
|
...Object.fromEntries(["reasoning_required", "reasoning_adaptive", "reasoning_budget_min", "reasoning_budget_max", "reasoning_format"].map(key => [key, first(model[key], caps[key])])),
|