Skip to content

refactor(codingcode): 重构工具参数处理与会话内存管理 #38

refactor(codingcode): 重构工具参数处理与会话内存管理

refactor(codingcode): 重构工具参数处理与会话内存管理 #38

Triggered via pull request June 8, 2026 06:07
@phantom5099phantom5099
synchronize #81
md-style
Status Failure
Total duration 1m 7s
Artifacts

pr-check.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

13 errors and 14 warnings
typecheck: packages/codingcode/test/agent/agent.test.ts#L326
Property 'memorySnapshot' is missing in type '{ sessionId: string; cwd: string; projectPath: string; transcriptPath: string; indexPath: string; messageCount: number; currentTurnId: number; sessionMeta: any; title: string; usage: undefined; promptEstimate: number; }' but required in type 'SessionStoreState'.
typecheck: packages/codingcode/test/agent/agent.test.ts#L271
Property 'memorySnapshot' is missing in type '{ sessionId: string; cwd: string; projectPath: string; transcriptPath: string; indexPath: string; messageCount: number; currentTurnId: number; sessionMeta: any; title: string; usage: undefined; promptEstimate: number; }' but required in type 'SessionStoreState'.
typecheck: packages/codingcode/test/agent/agent.test.ts#L240
Property 'memorySnapshot' is missing in type '{ sessionId: string; cwd: string; projectPath: string; transcriptPath: string; indexPath: string; messageCount: number; currentTurnId: number; sessionMeta: any; title: string; usage: undefined; promptEstimate: number; }' but required in type 'SessionStoreState'.
typecheck: packages/codingcode/test/agent/agent.test.ts#L184
Property 'memorySnapshot' is missing in type '{ sessionId: string; cwd: string; projectPath: string; transcriptPath: string; indexPath: string; messageCount: number; currentTurnId: number; sessionMeta: any; title: string; usage: undefined; promptEstimate: number; }' but required in type 'SessionStoreState'.
typecheck: packages/codingcode/test/agent/agent.test.ts#L128
Property 'memorySnapshot' is missing in type '{ sessionId: string; cwd: string; projectPath: string; transcriptPath: string; indexPath: string; messageCount: number; currentTurnId: number; sessionMeta: any; title: string; usage: undefined; promptEstimate: number; }' but required in type 'SessionStoreState'.
typecheck: packages/codingcode/test/agent/agent.test.ts#L106
Property 'memorySnapshot' is missing in type '{ sessionId: string; cwd: string; projectPath: string; transcriptPath: string; indexPath: string; messageCount: number; currentTurnId: number; sessionMeta: any; title: string; usage: undefined; promptEstimate: number; }' but required in type 'SessionStoreState'.
typecheck: packages/codingcode/test/agent/agent-todo-event.test.ts#L147
Property 'memorySnapshot' is missing in type '{ sessionId: string; cwd: string; projectPath: string; transcriptPath: string; indexPath: string; messageCount: number; currentTurnId: number; sessionMeta: any; title: string; usage: undefined; promptEstimate: number; }' but required in type 'SessionStoreState'.
typecheck: packages/codingcode/test/agent/agent-todo-event.test.ts#L104
Property 'memorySnapshot' is missing in type '{ sessionId: string; cwd: string; projectPath: string; transcriptPath: string; indexPath: string; messageCount: number; currentTurnId: number; sessionMeta: any; title: string; usage: undefined; promptEstimate: number; }' but required in type 'SessionStoreState'.
typecheck: packages/codingcode/test/agent/agent-concurrent.test.ts#L223
Property 'memorySnapshot' is missing in type '{ sessionId: string; cwd: string; projectPath: string; transcriptPath: string; indexPath: string; messageCount: number; currentTurnId: number; sessionMeta: any; title: string; usage: undefined; promptEstimate: number; }' but required in type 'SessionStoreState'.
typecheck: packages/codingcode/test/agent/agent-concurrent.test.ts#L154
Property 'memorySnapshot' is missing in type '{ sessionId: string; cwd: string; projectPath: string; transcriptPath: string; indexPath: string; messageCount: number; currentTurnId: number; sessionMeta: any; title: string; usage: undefined; promptEstimate: number; }' but required in type 'SessionStoreState'.
test
Process completed with exit code 1.
packages/codingcode/test/ci/tooling-scripts.test.ts > CI tooling configuration > pnpm run format:check exits successfully: packages/codingcode/test/ci/tooling-scripts.test.ts#L49
AssertionError: expected [Function] to not throw an error but 'Error: Command failed: pnpm run forma…' was thrown - Expected: undefined + Received: "Error: Command failed: pnpm run format:check [WARN] The \"pnpm\" field in package.json is no longer read by pnpm. The following keys were ignored: \"pnpm.overrides\". See https://pnpm.io/settings for the new home of each setting. $ prettier --check \"packages/**/*.{ts,tsx,json}\" \"*.json\" \"*.ts\" [warn] packages/codingcode/test/agent/memory-snapshot.test.ts [warn] packages/desktop/src/agent/AgentSidebar.tsx [warn] packages/desktop/src/agent/MessageStream.tsx [warn] packages/desktop/src/agent/ProjectStrip.tsx [warn] packages/desktop/src/agent/TodoPanel.tsx [warn] packages/desktop/src/settings/HooksPanel.tsx [warn] packages/desktop/src/settings/McpPanel.tsx [warn] packages/desktop/src/settings/MemoryPanel.tsx [warn] packages/desktop/src/settings/SettingsPage.tsx [warn] packages/desktop/src/settings/SkillPanel.tsx [warn] packages/desktop/src/settings/SubagentsPanel.tsx [warn] packages/desktop/src/shared/ErrorBoundary.tsx [warn] packages/desktop/src/shared/MarkdownRenderer.tsx [warn] packages/desktop/src/shared/MessageItem.tsx [warn] packages/desktop/src/shared/ToolCallCard.tsx [warn] packages/desktop/src/shared/ToolSummary.tsx [warn] packages/desktop/src/shared/UnifiedDiffView.tsx [warn] packages/desktop/src/stores/global.store.ts [warn] packages/desktop/test/MarkdownRenderer.test.ts [warn] packages/desktop/test/use-copy-to-clipboard.test.tsx [warn] packages/tui/src/components/CodeBlock.tsx [warn] packages/tui/src/components/MarkdownText.tsx [warn] packages/tui/src/utils.ts [warn] packages/tui/test/components/MarkdownText.test.ts [warn] Code style issues found in 24 files. Run Prettier with --write to fix. " ❯ packages/codingcode/test/ci/tooling-scripts.test.ts:49:87
packages/codingcode/test/ci/tooling-scripts.test.ts > CI tooling configuration > GitHub Actions workflow exists with required jobs: packages/codingcode/test/ci/tooling-scripts.test.ts#L38
AssertionError: expected 'name: PR Check\n\non:\n pull_request…' to contain 'format-check:' - Expected + Received - format-check: + name: PR Check + + on: + pull_request: + branches: [main, master] + + concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number }} + cancel-in-progress: true + + permissions: + contents: read + + jobs: + changes: + runs-on: ubuntu-latest + outputs: + code: ${{ steps.filter.outputs.code }} + steps: + - uses: actions/checkout@v4 + - uses: dorny/paths-filter@v3 + id: filter + with: + filters: | + code: + - 'packages/**' + - 'package.json' + - 'pnpm-lock.yaml' + - 'tsconfig*.json' + - 'vitest.config.ts' + - 'eslint.config.mjs' + - '.prettierrc' + + lint: + needs: changes + if: ${{ needs.changes.outputs.code == 'true' }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v3 + - uses: actions/setup-node@v4 + with: + node-version: '22' + cache: 'pnpm' + - run: pnpm install + - run: pnpm run lint + + typecheck: + needs: changes + if: ${{ needs.changes.outputs.code == 'true' }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v3 + - uses: actions/setup-node@v4 + with: + node-version: '22' + cache: 'pnpm' + - run: pnpm install + - run: pnpm run typecheck + + test: + needs: changes + if: ${{ needs.changes.outputs.code == 'true' }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v3 + - uses: actions/setup-node@v4 + with: + node-version: '22' + cache: 'pnpm' + - run: pnpm install + - run: pnpm vitest run + + build-desktop: + needs: [changes, lint, typecheck, test] + if: ${{ needs.changes.outputs.code == 'true' }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v3 + - uses: actions/setup-node@v4 + with: + node-version: '22' + cache: 'pnpm' + - run: pnpm install + - run: pnpm --filter @codingcode/desktop run build + ❯ packages/codingcode/test/ci/tooling-scripts.test.ts:38:21
changes
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/checkout@v4, dorny/paths-filter@v3. Actions will be forced to run with Node.js 24 by default starting June 16th, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
lint
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/checkout@v4, actions/setup-node@v4, pnpm/action-setup@v3. Actions will be forced to run with Node.js 24 by default starting June 16th, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
lint: packages/codingcode/src/mcp/client.ts#L66
'tp' is assigned a value but never used. Allowed unused vars must match /^_/u
lint: packages/codingcode/src/llm/errors.ts#L4
'timeoutMs' is defined but never used. Allowed unused args must match /^_/u
lint: packages/codingcode/src/hooks/registry.ts#L63
'getMapForScope' is defined but never used. Allowed unused vars must match /^_/u
lint: packages/codingcode/src/hooks/registry.ts#L56
This generator function does not have 'yield'
lint: packages/codingcode/src/hooks/executor.ts#L27
'code' is defined but never used. Allowed unused args must match /^_/u
lint: packages/codingcode/src/context/context.ts#L8
This generator function does not have 'yield'
lint: packages/codingcode/src/context/compressor/index.ts#L121
'ESTIMATED_SUMMARY_TOKENS' is assigned a value but never used. Allowed unused vars must match /^_/u
lint: packages/codingcode/src/client/direct/models.ts#L3
'getLLMClient' is defined but never used. Allowed unused vars must match /^_/u
lint: packages/codingcode/src/agent/agent.ts#L23
'AgentProfile' is defined but never used. Allowed unused vars must match /^_/u
lint: packages/codingcode/src/agent/agent.ts#L3
'appendFileSync' is defined but never used. Allowed unused vars must match /^_/u
typecheck
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/checkout@v4, actions/setup-node@v4, pnpm/action-setup@v3. Actions will be forced to run with Node.js 24 by default starting June 16th, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
test
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/checkout@v4, actions/setup-node@v4, pnpm/action-setup@v3. Actions will be forced to run with Node.js 24 by default starting June 16th, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/