qwen-code/packages/vscode-ide-companion/tsconfig.json
易良 5e1b8b0d59
feat(vscode-companion): support /export session command (#2592)
* feat(vscode-companion): support /export session command

* fix(vscode-ide-companion/webview): prefer ACP session id for export

* feat(vscode-ide-companion): support /export slash command

Add nested /export completion and ACP command availability for the VS Code companion.

Reuse the shared export flow, write to the default path, and show clickable export results in chat.

* fix(export): align slash command messaging

Restore the CLI export description to the existing wording.

Keep the VS Code companion error message consistent with the required /export subcommands.

* fix(webui): support explicit markdown file links

Handle local markdown file links in assistant messages even when automatic file-link detection is disabled.

Normalize encoded paths and line fragments so exported files can be opened from the VS Code webview.

* test(vscode-ide-companion): make export path assertion cross-platform

* fix(vscode-ide-companion): use public session export entrypoint

* fix(cli): replay standalone ESC after early capture

* fix(vscode-ide-companion): resolve rebase artifacts and vitest export alias

Remove duplicate AvailableCommand import caused by merge, and add
vitest resolve alias for @qwen-code/qwen-code/export so the session
export service tests can resolve the CLI export module from source.

* fix(cli): fix getAvailableCommands test mock to use getCommandsForMode

The test mock was only setting up getCommands but getAvailableCommands
calls getCommandsForMode. Add getCommandsForMode to the mock and set up
test data on it instead.

* fix(vscode-ide-companion): fix export file link click and add save dialog

- Fix file:/// URI handling in MarkdownRenderer: normalizeExplicitFileLink
  now strips the file:// scheme before checking isAbsolutePath, so exported
  file links are properly recognized and clickable
- Replace direct cwd file write with vscode.window.showSaveDialog() so
  users can choose the export destination and filename
- Handle cancelled save dialog gracefully (return null, skip success message)

* fix(webui): scope file link handler to file:// URIs only, fix # in filenames

- normalizeExplicitFileLink now returns early for file:// URIs without
  splitting on #, since vscode.Uri.file() encodes # as %23 in the path.
  This prevents filenames containing # from being truncated after decode.
- Explicit-link click handler now only fires for file:// URI hrefs,
  not arbitrary relative paths. This prevents model-generated markdown
  links from bypassing enableFileLinks=false and opening arbitrary files.
- Remove unused KNOWN_FILE_EXTENSIONS constant.

* fix(vscode-ide-companion): update export tests for save dialog, fix stale JSDoc

- Add showSaveDialog mock to sessionExportService.test.ts
- Update existing test to verify save dialog is called with correct args
- Add test for cancelled save dialog returning null
- Fix JSDoc that incorrectly claimed fallback-to-cwd behavior
2026-04-24 17:55:26 +08:00

21 lines
759 B
JSON

{
"compilerOptions": {
"module": "NodeNext",
"moduleResolution": "NodeNext",
"target": "ES2022",
"lib": ["ES2022", "dom"],
"jsx": "react-jsx",
"jsxImportSource": "react",
"sourceMap": true,
"strict": true,
"skipLibCheck": true,
"paths": {
"@lydell/node-pty": ["../../node_modules/@lydell/node-pty/node-pty.d.ts"],
"@qwen-code/qwen-code/export": ["../cli/src/export/index.ts"]
}
/* Additional Checks */
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
// "noUnusedParameters": true, /* Report errors on unused parameters. */
}
}