qwen-code/docs/users
Yan Shen 9b20c47f46
feat(core): respect configurable agent ignore files (#4653)
* Respect agent ignore conventions through configurable filtering

Constraint: Issue #1746 requests .agentignore/.aiignore compatibility and maintainer feedback asks for a custom ignore-file configuration path.
Rejected: Hardcode only .agentignore/.aiignore | would not satisfy the maintainer's configurable-ignore direction.
Confidence: high
Scope-risk: moderate
Directive: Keep .qwenignore always included when respectQwenIgnore is enabled; route extra filenames through customIgnoreFiles.
Tested: Core targeted vitest suite; CLI targeted vitest plus config integration; npm run build && npm run typecheck; targeted eslint; git diff --check.
Not-tested: Full repository test suite and model-driven end-to-end CLI integration tests.

* fix(cli): keep custom ignore settings type-safe and honest

The schema default otherwise narrows customIgnoreFiles to the built-in tuple and the UI text implies additive behavior that the implementation does not provide.

Constraint: Address wenshao's two review comments without changing replacement semantics.

Rejected: Merge user values with defaults | Larger behavior change was not requested for this follow-up.

Confidence: high

Scope-risk: narrow

Directive: Preserve replacement semantics unless a future change intentionally updates config merging and docs together.

Tested: cd packages/cli && npx vitest run src/config/config.test.ts src/config/settingsSchema.test.ts; npm run build; npm run typecheck; npm run lint; git diff --check

Not-tested: Full integration suite.

* fix(core): keep custom ignore settings consistent

Ensure review-sensitive file discovery paths, grep ignore resolution, and user-facing ignore names preserve the configured custom ignore behavior instead of falling back to defaults or search-directory-local files.

Constraint: PR #4653 review feedback requires customIgnoreFiles to behave consistently across secondary discovery and grep paths.

Rejected: Merge custom ignore files with defaults | The current PR documents replacement semantics and prior review feedback accepted that contract.

Confidence: high

Scope-risk: narrow

Directive: Keep .qwenignore always included, but treat customIgnoreFiles as the replacement list for additional AI ignore files.

Tested: packages/core targeted vitest for qwenIgnoreParser, fileDiscoveryService, ripGrep, config, read-file; packages/cli config vitest; targeted workspaceFileSystem custom-ignore vitest; Prettier check; ESLint on touched files; git diff --check.

Not-tested: Full workspace typecheck/build because current branch fails before this change on environmentContext.test.ts syntax and unrelated CLI type errors; full workspaceFileSystem suite on Windows because existing symlink tests fail with EPERM.

* test(core): cover subagent custom ignore inheritance

Keep the in-process backend tests aligned with the new per-agent file filtering contract so CI catches missing custom-ignore propagation.

Constraint: PR review fixes require subagents to inherit parent custom ignore settings.
Confidence: high
Scope-risk: narrow
Tested: npx vitest run src/agents/backends/InProcessBackend.test.ts
Tested: npx vitest run src/utils/qwenIgnoreParser.test.ts src/services/fileDiscoveryService.test.ts src/tools/ripGrep.test.ts src/config/config.test.ts src/tools/read-file.test.ts src/agents/backends/InProcessBackend.test.ts src/tools/agent/agent.test.ts
Tested: npx vitest run src/serve/fs/workspaceFileSystem.test.ts -t "uses configured custom ignore files"
Tested: npx prettier --check packages/core/src/agents/backends/InProcessBackend.test.ts
Tested: npx eslint packages/core/src/agents/backends/InProcessBackend.test.ts
Tested: git diff --check
Not-tested: full npm run typecheck remains blocked by existing branch-wide TypeScript errors outside this test change

* test(core): fix subagent custom ignore test typing

Keep the custom-ignore regression test type-checkable under the repo build, where createMockConfig is intentionally cast to never.

Constraint: CI runs package build during dependency installation and type-checks test files.
Confidence: high
Scope-risk: narrow
Tested: npx vitest run src/agents/backends/InProcessBackend.test.ts
Tested: npx prettier --check packages/core/src/agents/backends/InProcessBackend.test.ts
Tested: npx eslint packages/core/src/agents/backends/InProcessBackend.test.ts
Tested: git diff --check
Not-tested: npm run build --workspace=packages/core is still blocked locally by src/utils/environmentContext.test.ts(599,1): error TS1005: '}' expected

* test(core): align notebook ignore message expectation

Keep notebook ignore validation tests in sync with the comma-separated ignore file display used by the review fix.

Constraint: PR review fixes changed ignore file display text from slash-separated to comma-separated.
Confidence: high
Scope-risk: narrow
Tested: npx vitest run src/tools/notebook-edit.test.ts
Tested: npx vitest run src/utils/qwenIgnoreParser.test.ts src/services/fileDiscoveryService.test.ts src/tools/ripGrep.test.ts src/tools/read-file.test.ts src/tools/notebook-edit.test.ts src/config/config.test.ts src/agents/backends/InProcessBackend.test.ts src/tools/agent/agent.test.ts
Tested: npx prettier --check packages/core/src/tools/notebook-edit.test.ts
Tested: npx eslint packages/core/src/tools/notebook-edit.test.ts
Tested: git diff --check
Not-tested: full npm run build --workspace=packages/core remains blocked locally by src/utils/environmentContext.test.ts(599,1): error TS1005: '}' expected

* fix(core): keep ripgrep ignore roots canonical

Constraint: PR #4653 review 4453010590 requested absolute ignore-root fallback behavior.

Rejected: Broader customIgnoreFiles semantic changes | outside the review scope and replacement semantics stay unchanged.

Confidence: high

Scope-risk: narrow

Directive: Keep customIgnoreFiles as replacement for compatibility defaults while always including .qwenignore.

Tested: cd packages/core && npx vitest run src/tools/ripGrep.test.ts; npx prettier --check src/tools/ripGrep.ts src/tools/ripGrep.test.ts; git diff --check

Not-tested: npm run typecheck --workspace=packages/core fails on existing src/utils/environmentContext.test.ts parse error.

* test(core): align ripgrep ignore path expectation

Constraint: macOS canonicalizes temporary paths through /private/var after process.chdir.

Rejected: Changing ripgrep ignore-root behavior | implementation already uses path.resolve correctly.

Confidence: high

Scope-risk: narrow

Directive: Keep the regression test tied to path.resolve behavior rather than raw temp-dir spelling.

Tested: cd packages/core && npx vitest run src/tools/ripGrep.test.ts; npx prettier --check src/tools/ripGrep.test.ts src/tools/ripGrep.ts; git diff --check

Not-tested: Full CI rerun is remote-only after push.

* fix(core): make custom ignore feedback actionable

Review feedback for PR #4653 showed users could not tell which ignore file blocked a path, and worktree isolation lacked coverage for inherited custom ignore files. This also closes the existing environmentContext.test describe block so build can progress to the current unrelated converter type blocker.

Constraint: PR #4653 keeps replacement semantics for customIgnoreFiles and always includes .qwenignore.

Rejected: Exposing matching pattern text | merged ignore and negation semantics can make pattern-level attribution misleading.

Confidence: high

Scope-risk: moderate

Directive: Keep customIgnoreFiles as replacement semantics unless the config contract changes deliberately.

Tested: core targeted Vitest suite; ripGrep regression test; cli settingsSchema test; Prettier check.

Not-tested: npm run build && npm run typecheck blocked by existing FinishReason type errors in converter.ts.

* fix(core): isolate qwen ignore sources

* test(cli): mock qwen ignore defaults in acp test

* test(scripts): make dev launcher test path portable

* fix(core): prevent ripgrep ignore negation bypass

* fix(core): post-filter ripgrep qwenignore matches

* fix(core): preserve ignore negations in grep

- Preserve non-.qwenignore negation semantics for grep searches

- Skip workspace-external ignore-file discovery

- Add coverage for ignore diagnostics and addSource behavior

* test(core): update yaml nested parser expectations

* chore: remove unrelated formatting churn
2026-06-23 10:44:37 +08:00
..
configuration feat(core): respect configurable agent ignore files (#4653) 2026-06-23 10:44:37 +08:00
extension feat(extensions): support archive install sources (#4909) 2026-06-22 13:36:13 +08:00
features docs(mcp): correct mcp add scope default (#5593) 2026-06-22 22:15:17 +08:00
ide-integration update documentation 2025-12-19 18:16:59 +08:00
reference docs(cli): document tmux scroll workaround (#5248) 2026-06-19 02:18:12 +08:00
support docs(cli): document tmux scroll workaround (#5248) 2026-06-19 02:18:12 +08:00
_meta.ts feat(daemon): merge daemon-mode feature batch into main (#4490) 2026-06-12 00:34:49 +08:00
common-workflow.md docs: fix stale defaults, CLI syntax, and tool naming drift (#5158) 2026-06-15 20:06:34 +08:00
integration-github-action.md docs: updated all links, click and open in vscode, new showcase video in overview 2025-12-17 11:10:31 +08:00
integration-jetbrains.md docs(integration): use CDN URLs for images and fix formatting 2026-03-16 14:12:48 +08:00
integration-vscode.md fix: docs 2026-01-14 10:30:03 +08:00
integration-zed.md docs(integration): use CDN URLs for images and fix formatting 2026-03-16 14:12:48 +08:00
overview.md feat(installer): verify release assets + switch public docs to standalone entrypoint (#3855) 2026-06-04 17:23:04 +08:00
quickstart.md feat(installer): verify release assets + switch public docs to standalone entrypoint (#3855) 2026-06-04 17:23:04 +08:00
qwen-serve-deploy-local.md feat(daemon): merge daemon-mode feature batch into main (#4490) 2026-06-12 00:34:49 +08:00
qwen-serve.md refactor(core): extract Protocol enum and decouple model identity from auth type (#5089) 2026-06-22 23:35:02 +08:00