diff --git a/apps/vscode-e2e/src/suite/providers/zai.test.ts b/apps/vscode-e2e/src/suite/providers/zai.test.ts index e015d08da..d3603c370 100644 --- a/apps/vscode-e2e/src/suite/providers/zai.test.ts +++ b/apps/vscode-e2e/src/suite/providers/zai.test.ts @@ -47,11 +47,10 @@ function installZAiFetchInterceptor( }) : {} - if (capture) { - capture.maxTokens = body.max_tokens - } - if (passthrough) { + if (capture) { + capture.maxTokens = body.max_tokens + } return original.call(globalThis, input, init as RequestInit) } @@ -65,6 +64,10 @@ function installZAiFetchInterceptor( throw new Error(`Z.ai fetch interceptor: no fixture matched. Last user message: ${text.slice(0, 200)}`) } + if (capture) { + capture.maxTokens = body.max_tokens + } + return makeZAiSSEResponse(fixture.result) } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 37914f8fc..a3c7b7066 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -814,7 +814,7 @@ importers: version: 0.518.0(react@18.3.1) mermaid: specifier: ^11.4.1 - version: 11.15.0 + version: 11.16.0 posthog-js: specifier: ^1.227.2 version: 1.393.4 @@ -1765,8 +1765,8 @@ packages: resolution: {integrity: sha512-LyQz4XJIdCdY/+temIhD/Ed0x/p4GAOUycpFSEK2Ads1CPKZy6b7V/2ROEtQiLLQ8soIs0xe/QAoR6kwpyW/yw==} engines: {node: '>=12'} - '@mermaid-js/parser@1.1.1': - resolution: {integrity: sha512-VuHdsYMK1bT6X2JbcAaWAhugTRvRBRyuZgd+c22swUeI9g/ntaxF7CY7dYarhZovofCbUNO0G7JesfmNtjYOCw==} + '@mermaid-js/parser@1.2.0': + resolution: {integrity: sha512-oYPyv8A4As1yH5Bx+04iQEQxXuIQDe0GKCNSRgao6z8AM9jixXIfP0vsppRLvGf+nKIOb9/LdpWA4YuJiVvESA==} '@microsoft/fast-element@1.14.0': resolution: {integrity: sha512-zXvuSOzvsu8zDTy9eby8ix8VqLop2rwKRgp++ZN2kTCsoB3+QJVoaGD2T/Cyso2ViZQFXNpiNCVKfnmxBvmWkQ==} @@ -4188,8 +4188,8 @@ packages: peerDependencies: cytoscape: ^3.2.0 - cytoscape@3.33.4: - resolution: {integrity: sha512-HIN5Pmd9MrX9BkV7tDwnOcEJCSFvCpc8X97h3f508J6I5FsqAY65wKOCvgH2CuP42CaahWaz4tuh32SOOIH7ww==} + cytoscape@3.34.0: + resolution: {integrity: sha512-62rNSrioXw93uliKFBwjukeQyeWwH2PqDrTac31r2P6464u3AUvTk0xS4LVvT251g7IgkFunrI48ZEZGjywSOg==} engines: {node: '>=0.10'} d3-array@2.12.1: @@ -4624,8 +4624,8 @@ packages: resolution: {integrity: sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==} engines: {node: '>= 0.4'} - es-toolkit@1.47.0: - resolution: {integrity: sha512-n1GuoD0WEQZMBk5tttoZSqwgyLx01oqa5XsBmCHwPyNe1S9jPBEmtR2pSgp2kJuWE3ciFZ6yRHmY4pM4C3OOkw==} + es-toolkit@1.49.0: + resolution: {integrity: sha512-G5iZ6Pc/FNRY/soKZHC+TxGDD83rHUDXxzaWhGCX44vAv/tMs56WMusnm/KMNK+luUPsgA9U28cGr4RDlSzL2g==} es6-error@4.1.1: resolution: {integrity: sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==} @@ -6304,8 +6304,8 @@ packages: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} - mermaid@11.15.0: - resolution: {integrity: sha512-pTMbcf3rWdtLiYGpmoTjHEpeY8seiy6sR+9nD7LOs8KfUbHE4lOUAprTRqRAcWSQ6MQpdX+YEsxShtGsINtPtw==} + mermaid@11.16.0: + resolution: {integrity: sha512-Zvm3kbstgdpvIJPPItlL7fppIZ3kibvc1oZIGxdvk9t6UFz6flv+Jw7FtRGKwfcI8OckmH04LqG6LlS6X4B1pA==} micromark-core-commonmark@2.0.3: resolution: {integrity: sha512-RDBrHEMSxVFLg6xvnXmb1Ayr2WzLAWjeSATAoxwKYJV94TeNavgoIdA0a9ytzDSVzBy2YKFK+emCPOEibLeCrg==} @@ -8023,8 +8023,8 @@ packages: peerDependencies: typescript: '>=4.8.4' - ts-dedent@2.2.0: - resolution: {integrity: sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==} + ts-dedent@2.3.0: + resolution: {integrity: sha512-JfJeIHke7y2egdGGgRAvpCwYFUsHlM2gPcrVOxFkznt/4uzQ7HFmvE63iFHVLBJNDuyDOQgijDK/tXH/f6Msjg==} engines: {node: '>=6.10'} ts-easing@0.2.0: @@ -9781,7 +9781,7 @@ snapshots: dependencies: unist-util-visit: 1.4.1 - '@mermaid-js/parser@1.1.1': + '@mermaid-js/parser@1.2.0': dependencies: '@chevrotain/types': 11.1.2 @@ -12254,17 +12254,17 @@ snapshots: csstype@3.1.3: {} - cytoscape-cose-bilkent@4.1.0(cytoscape@3.33.4): + cytoscape-cose-bilkent@4.1.0(cytoscape@3.34.0): dependencies: cose-base: 1.0.3 - cytoscape: 3.33.4 + cytoscape: 3.34.0 - cytoscape-fcose@2.2.0(cytoscape@3.33.4): + cytoscape-fcose@2.2.0(cytoscape@3.34.0): dependencies: cose-base: 2.2.0 - cytoscape: 3.33.4 + cytoscape: 3.34.0 - cytoscape@3.33.4: {} + cytoscape@3.34.0: {} d3-array@2.12.1: dependencies: @@ -12764,7 +12764,7 @@ snapshots: is-date-object: 1.1.0 is-symbol: 1.1.1 - es-toolkit@1.47.0: {} + es-toolkit@1.49.0: {} es6-error@4.1.1: {} @@ -13748,7 +13748,7 @@ snapshots: cli-cursor: 4.0.0 cli-truncate: 5.2.0 code-excerpt: 4.0.0 - es-toolkit: 1.47.0 + es-toolkit: 1.49.0 indent-string: 5.0.0 is-in-ci: 2.0.0 patch-console: 2.0.0 @@ -14783,28 +14783,28 @@ snapshots: merge2@1.4.1: {} - mermaid@11.15.0: + mermaid@11.16.0: dependencies: '@braintree/sanitize-url': 7.1.2 '@iconify/utils': 3.1.3 - '@mermaid-js/parser': 1.1.1 + '@mermaid-js/parser': 1.2.0 '@types/d3': 7.4.3 '@upsetjs/venn.js': 2.0.0 - cytoscape: 3.33.4 - cytoscape-cose-bilkent: 4.1.0(cytoscape@3.33.4) - cytoscape-fcose: 2.2.0(cytoscape@3.33.4) + cytoscape: 3.34.0 + cytoscape-cose-bilkent: 4.1.0(cytoscape@3.34.0) + cytoscape-fcose: 2.2.0(cytoscape@3.34.0) d3: 7.9.0 d3-sankey: 0.12.3 dagre-d3-es: 7.0.14 dayjs: 1.11.21 dompurify: 3.4.11 - es-toolkit: 1.47.0 + es-toolkit: 1.49.0 katex: 0.16.47 khroma: 2.1.0 marked: 16.4.2 roughjs: 4.6.6 stylis: 4.4.0 - ts-dedent: 2.2.0 + ts-dedent: 2.3.0 uuid: 11.1.1 micromark-core-commonmark@2.0.3: @@ -16863,7 +16863,7 @@ snapshots: dependencies: typescript: 5.8.3 - ts-dedent@2.2.0: {} + ts-dedent@2.3.0: {} ts-easing@0.2.0: {}