Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions linux-features/agent-workspace/patch.js
Original file line number Diff line number Diff line change
Expand Up @@ -1929,9 +1929,9 @@ const PATCHED_SETTINGS_ICON_PATTERN = new RegExp(
`"agent-workspaces":\\1,worktrees:`,
);
const CURRENT_SETTINGS_PRELOAD_SLUGS =
"`hooks-settings`,`local-environments`,`worktrees`,`data-controls`";
"`hooks-settings`,`local-environments`,`worktrees`,`archived-chats`";
const PATCHED_SETTINGS_PRELOAD_SLUGS =
"`hooks-settings`,`local-environments`,`agent-workspaces`,`worktrees`,`data-controls`";
"`hooks-settings`,`local-environments`,`agent-workspaces`,`worktrees`,`archived-chats`";
const CURRENT_SETTINGS_POLICY_PATTERN =
/"local-environments":([A-Za-z_$][\w$]*|`codexLocal`),"mcp-settings":/;
const PATCHED_SETTINGS_POLICY_PATTERN =
Expand Down
4 changes: 2 additions & 2 deletions linux-features/agent-workspace/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ function syntheticCurrentSettingsVisibility() {
'var it={"linux-desktop":{component:H},"general-settings":{component:H},"local-environments":{component:H,commandAsset:F,navigation:{assets:{16:F,20:H},ariaHidden:!1}},worktrees:{component:F,commandAsset:H,navigation:{assets:{16:H,20:F},ariaHidden:!1}},environments:{component:H},"mcp-settings":{component:H},connections:{component:H}};',
"function visible(S){switch(S.slug){case`computer-use`:return!0;case`browser-use`:return!0;case`appearance`:return!0;case`pets`:case`git-settings`:case`worktrees`:case`local-environments`:case`environments`:return!0;case`data-controls`:return!0;case`linux-desktop`:case`general-settings`:case`agent`:case`personalization`:return!0;}}",
"function loading(r){switch(r){case`browser-use`:return!1;case`hooks-settings`:case`mcp-settings`:return!1}}",
"var preload=[`hooks-settings`,`local-environments`,`worktrees`,`data-controls`];",
"var preload=[`hooks-settings`,`local-environments`,`worktrees`,`archived-chats`,`voice`];",
'var policy={"local-environments":`codexLocal`,"mcp-settings":`codexOrWorkLocal`,worktrees:`codexLocal`};',
].join("");
}
Expand Down Expand Up @@ -1650,7 +1650,7 @@ test("settings asset patches add navigation, route, visibility, and title", () =
settingsVisibility,
/case`worktrees`:case`local-environments`:case`agent-workspaces`:case`environments`:return!0/,
);
assert.match(settingsVisibility, /`local-environments`,`agent-workspaces`,`worktrees`,`data-controls`/);
assert.match(settingsVisibility, /`local-environments`,`agent-workspaces`,`worktrees`,`archived-chats`/);
assert.match(settingsVisibility, /"local-environments":`codexLocal`,"agent-workspaces":`codexLocal`,"mcp-settings":/);
assert.equal(applyAgentWorkspaceSettingsPagePatch(settingsVisibility), settingsVisibility);
});
Expand Down
4 changes: 2 additions & 2 deletions linux-features/api-key-service-tier/patch.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const PATCHED_SERVICE_TIER_RESOLVER = new RegExp(
`\\1\\?\\.serviceTiers\\?\\.find\\((${JS_IDENT})=>\\3\\.id===\\2\\)\\?\\?null\\}`,
);
const MODEL_LIST_MAPPING_SHAPE = new RegExp(
`function ${JS_IDENT}\\(\\{additionalAvailableModels:${JS_IDENT},authMethod:${JS_IDENT},availableModels:${JS_IDENT},` +
`function ${JS_IDENT}\\(\\{additionalAvailableModels:${JS_IDENT},apiKeyDaybreakSupported:${JS_IDENT}=!1,authMethod:${JS_IDENT},availableModels:${JS_IDENT},` +
`defaultModel:${JS_IDENT},enabledReasoningEfforts:${JS_IDENT},` +
`hasConfiguredModelCatalog:${JS_IDENT},` +
`includeUltraReasoningEffort:${JS_IDENT},isCustomModelProvider:${JS_IDENT}=!1,` +
Expand Down Expand Up @@ -68,7 +68,7 @@ function applyApiKeyModelMarkerPatch(source) {
}

const modelListPattern = new RegExp(
`(function ${JS_IDENT}\\(\\{additionalAvailableModels:${JS_IDENT},authMethod:(${JS_IDENT}),availableModels:${JS_IDENT},` +
`(function ${JS_IDENT}\\(\\{additionalAvailableModels:${JS_IDENT},apiKeyDaybreakSupported:${JS_IDENT}=!1,authMethod:(${JS_IDENT}),availableModels:${JS_IDENT},` +
`defaultModel:${JS_IDENT},enabledReasoningEfforts:${JS_IDENT},` +
`hasConfiguredModelCatalog:${JS_IDENT},` +
`includeUltraReasoningEffort:${JS_IDENT},isCustomModelProvider:${JS_IDENT}=!1,` +
Expand Down
6 changes: 3 additions & 3 deletions linux-features/api-key-service-tier/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function applyPatchTwice(patchFn, source) {
}

function currentModelFixture() {
return "function iti({additionalAvailableModels:e,authMethod:t,availableModels:n,defaultModel:r,enabledReasoningEfforts:i,hasConfiguredModelCatalog:h,includeUltraReasoningEffort:a,isCustomModelProvider:o=!1,models:s,useHiddenModels:c}){let l=[],u=null,d=s.some(e=>e.supportedReasoningEfforts.some(({reasoningEffort:e})=>e===`max`)),f=a&&s.some(e=>e.supportedReasoningEfforts.some(({reasoningEffort:e})=>e===`ultra`));return s.forEach(r=>{if(ati({additionalAvailableModels:e,authMethod:t,availableModels:n,hasConfiguredModelCatalog:h,isCustomModelProvider:o,model:r,useHiddenModels:c})){let e=a?r.supportedReasoningEfforts:r.supportedReasoningEfforts.filter(({reasoningEffort:e})=>e!==`ultra`),n=(t===`copilot`?[e.find(e=>e.reasoningEffort===`medium`)??{reasoningEffort:`medium`,description:`medium effort`}]:e).filter(({reasoningEffort:e})=>cI(e)&&i.has(e)),o={...r,supportedReasoningEfforts:n};l.push(o),r.isDefault&&(u=o)}}),u??=l.find(e=>e.model===r)??null,{models:l,defaultModel:u,hasModelSupportingMaxReasoningEffort:d,hasModelSupportingUltraReasoningEffort:f}}";
return "function iti({additionalAvailableModels:e,apiKeyDaybreakSupported:q=!1,authMethod:t,availableModels:n,defaultModel:r,enabledReasoningEfforts:i,hasConfiguredModelCatalog:h,includeUltraReasoningEffort:a,isCustomModelProvider:o=!1,models:s,useHiddenModels:c}){let l=[],u=null,d=s.some(e=>e.supportedReasoningEfforts.some(({reasoningEffort:e})=>e===`max`)),f=a&&s.some(e=>e.supportedReasoningEfforts.some(({reasoningEffort:e})=>e===`ultra`));return s.forEach(r=>{if(ati({additionalAvailableModels:e,apiKeyDaybreakSupported:q,authMethod:t,availableModels:n,hasConfiguredModelCatalog:h,isCustomModelProvider:o,model:r,useHiddenModels:c})){let e=a?r.supportedReasoningEfforts:r.supportedReasoningEfforts.filter(({reasoningEffort:e})=>e!==`ultra`),n=(t===`copilot`?[e.find(e=>e.reasoningEffort===`medium`)??{reasoningEffort:`medium`,description:`medium effort`}]:e).filter(({reasoningEffort:e})=>cI(e)&&i.has(e)),o={...r,supportedReasoningEfforts:n};l.push(o),r.isDefault&&(u=o)}}),u??=l.find(e=>e.model===r)??null,{models:l,defaultModel:u,hasModelSupportingMaxReasoningEffort:d,hasModelSupportingUltraReasoningEffort:f}}";
}

function captureWarnings(callback) {
Expand Down Expand Up @@ -308,9 +308,9 @@ test("model list marker warning ignores unrelated app-main chunks", () => {
}), []);
});

test("model list marker rejects the superseded pre-catalog signature byte-identically", () => {
test("model list marker rejects the superseded pre-Daybreak signature byte-identically", () => {
const source =
"function broken({additionalAvailableModels:e,authMethod:t,availableModels:n,defaultModel:r,enabledReasoningEfforts:i,includeUltraReasoningEffort:a,isCustomModelProvider:o=!1,models:s,useHiddenModels:c}){return s.map(e=>({supportedReasoningEfforts:e.supportedReasoningEfforts,hasModelSupportingUltraReasoningEffort:e.isDefault}))}";
"function broken({additionalAvailableModels:e,authMethod:t,availableModels:n,defaultModel:r,enabledReasoningEfforts:i,hasConfiguredModelCatalog:h,includeUltraReasoningEffort:a,isCustomModelProvider:o=!1,models:s,useHiddenModels:c}){return s.map(e=>({supportedReasoningEfforts:e.supportedReasoningEfforts,hasModelSupportingUltraReasoningEffort:e.isDefault}))}";

assert.equal(hasApiKeyModelListMappingShape(source), false);
assert.deepEqual(captureWarnings(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ function mountAnimations(source) {
const initialVar = controller[2];
if (!ownerSource.includes("@container/app-shell-tab")) continue;
const assignmentPattern = new RegExp(
`(?:let |,)${escapeRegExp(initialVar)}=(?<expression>!1|(?<animate>[A-Za-z_$][\\w$]*)\\?(?<collapsed>[A-Za-z_$][\\w$]*):!1),`,
`(?:let |,)${escapeRegExp(initialVar)}=(?<expression>!1|(?<animate>[A-Za-z_$][\\w$]*)&&` +
`(?<presence>[A-Za-z_$][\\w$]*)\\?\\.initial!==!1\\?(?<collapsed>[A-Za-z_$][\\w$]*):!1),`,
"u",
);
const assignment = assignmentPattern.exec(ownerSource);
Expand All @@ -112,6 +113,7 @@ function mountAnimations(source) {
if (!/animateLayout:[A-Za-z_$][\w$]*(?:[,}])/u.test(ownerSource)) continue;
} else {
if (!new RegExp(`animateLayout:${escapeRegExp(assignment.groups.animate)}(?:[,}])`, "u").test(ownerSource)) continue;
if (!new RegExp(`\\(0,${JS_IDENT}\\.useContext\\)\\(${JS_IDENT}\\)`, "u").test(ownerSource)) continue;
const collapsedVar = assignment.groups.collapsed;
const collapsedSelection = ownerSource.match(
new RegExp(
Expand Down
2 changes: 1 addition & 1 deletion linux-features/linux-performance-workarounds/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const {
function currentAppShellTabLayoutFixture() {
return [
"function o9a(){let re=(e,t)=>{K(t.scrollWidth>t.clientWidth)},ie=Xu(re),ye=`@max-[4rem]/app-shell-tab:invisible`;return jsx(`button`,{ref:ie,\"data-app-shell-tab-close-button\":!0})}",
"function m9a(e){let{animateLayout:n,targetWidth:O,sharesTabWidth:m}=e,N=O==null?m?MZt:jZt:pZt,ie={maxWidth:`160px`},se=n?N:!1,ve={},te=`@container/app-shell-tab`;return jsx(kf.div,{className:te,animate:ie,\"data-app-shell-tab-controller\":ke,initial:se,style:{},transition:ve,onAnimationComplete:Re})}",
"function m9a(e){let{animateLayout:n,targetWidth:O,sharesTabWidth:m}=e,C=(0,React.useContext)(InitialContext),N=O==null?m?MZt:jZt:pZt,ie={maxWidth:`160px`},se=n&&C?.initial!==!1?N:!1,ve={},te=`@container/app-shell-tab`;return jsx(kf.div,{className:te,animate:ie,\"data-app-shell-tab-controller\":ke,initial:se,style:{},transition:ve,onAnimationComplete:Re})}",
"var jZt={maxWidth:`0px`,minWidth:`0px`},MZt={maxWidth:`0px`,\"--tab-size-progress\":0},pZt={width:`0px`};",
].join("");
}
Expand Down
Loading
Loading