qwen-code/packages/core/src
tanzhenxin 097f1b3da9 feat(core): add truncation support to LS tool
Add output truncation for directory listings when entries exceed
configured line limit. This prevents overwhelming output for large
directories while still informing users of truncated content.

- Add MAX_ENTRY_COUNT constant (100) as upper bound
- Use getTruncateToolOutputLines() config for dynamic limits
- Show truncated item count with proper singular/plural handling
- Update output format with --- separators for clarity
- Add comprehensive tests for truncation behavior

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-12 19:59:59 +08:00
..
__mocks__/fs pre-release commit 2025-07-22 23:26:01 +08:00
config Merge remote-tracking branch 'origin/main' into feat/ask-user-question-tool 2026-03-08 23:05:32 +08:00
confirmation-bus remove useless type 2026-03-02 19:30:24 -08:00
core fix(core): convert array content to string for DeepSeek API 2026-03-12 17:18:27 +08:00
extension fix mcp ui 2026-03-09 15:20:30 +08:00
hooks reslove aggregator for userpromptsubmit 2026-03-05 23:59:43 -08:00
ide fix(ide): correct HTTP connection order and lock file matching logic 2026-03-03 21:14:47 +08:00
lsp fix: change workspaceFolders capability to boolean for LSP servers 2026-02-24 15:02:47 +00:00
mcp fix(mcp): use scopes from protected resource metadata (RFC 9728) 2026-03-09 17:30:06 +08:00
mocks chore(usage telemetry): Freshen up Clearcut logging (#6013) 2025-08-12 18:31:59 +00:00
models Merge pull request #1982 from QwenLM/fix/modality-defaults-pdf-error 2026-03-02 17:42:17 +08:00
output Headless enhancement: add stream-json as input-format/output-format to support programmatically use (#926) 2025-11-21 09:26:05 +08:00
prompts feat(core): migrate console calls to debugLogger (M3 Phase 6) 2026-01-25 22:12:45 +08:00
qwen fix: remove qrcode-terminal dependency and update tests 2026-03-12 13:42:59 +08:00
services Merge branch 'main' into feat/shell-pty-default-and-enhancements 2026-03-06 14:36:18 +08:00
skills refactor(core): utilize normalizeContent in subagent, skill, and claude managers 2026-02-21 18:23:57 +05:30
subagents Merge remote-tracking branch 'upstream/main' into fix/windows-crlf-parsing 2026-03-04 18:43:36 +05:30
telemetry Merge branch 'main' into feat/sandbox-config-improvements 2026-03-06 14:38:39 +08:00
test-utils Session-Level Conversation History Management (#1113) 2025-12-03 18:04:48 +08:00
tools feat(core): add truncation support to LS tool 2026-03-12 19:59:59 +08:00
utils Merge branch 'main' into feat/shell-pty-default-and-enhancements 2026-03-06 14:36:18 +08:00
index.test.ts pre-release commit 2025-07-22 23:26:01 +08:00
index.ts Merge branch 'main' into feat/shell-pty-default-and-enhancements 2026-03-06 14:36:18 +08:00