Document PowerShell shell semantics and read-only Bash deduplication in Built-in Tools reference

Aperta Adatta ai principianti
#64 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Documentazione
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
bash, powershell, typescript
Ambito
cli, documentation

Direzione di ricerca

Leggi docs/en/reference/tools.md e docs/zh/reference/tools.md, concentrandoti sulla sezione Shell, poi controlla bashConcurrency.ts e bashTool.ts per verificare il comportamento documentato. Aggiorna entrambi i riferimenti per spiegare i separatori di comando di PowerShell 5.1 su Windows SSH e indicare che le chiamate Bash identiche di sola lettura possono essere deduplicate. Descrivi come usare chiamate di sola lettura distinte per verificare l’esecuzione parallela. Il lavoro è completato quando entrambe le versioni linguistiche rispecchiano accuratamente questi comportamenti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

documentation

What went wrong?

Found during the #5 tool verification pass (#5 Step 17).

Two details in Bash same-step execution differ from the #5 Step 17 expectation and docs/{en,zh}/reference/tools.md:

  1. Identical concurrency-safe Bash calls are deduplicated instead of running twice in parallel.
    bashTool.ts:158 classifies sleep 2 && ls on bash as ToolAccesses.readAll(), which causes ToolDedupeService (toolDedupeService.ts:95-105) to deduplicate two identical Bash { "command": "sleep 2 && ls" } calls in the same model step rather than running two processes concurrently:

    • Call: two Bash { "command": "sleep 2 && ls" } calls in one step (Local Windows Git Bash and POSIX SSH Bash).
    • Received text on second call:
      [Same call as another in this step; it ran once and this is that result.]
      crlf.txt
      long.txt
      pic.png
      pkg
      

    Distinct read-only Bash calls (for example sleep 2 && ls + sleep 2 && pwd) are required to exercise parallel execution, and bashConcurrency.ts:4 includes sleep in READ_ONLY_COMMANDS even though docs/{en,zh}/reference/tools.md only lists inspection commands (ls, cat, rg, grep, find, git log/show/rev-parse).

  2. Windows SSH runs Windows PowerShell 5.1, where && is a syntax error.

    • Call (Windows SSH, shell: powershell): Bash { "command": "sleep 2 && ls", "host": "issue5-windows" }
    • Received text:
      <system>ERROR: Command exited with code 1.</system>
      host: issue5-windows
      platform: Windows
      shell: powershell
      At line:2 char:9
      + sleep 2 && ls
      +         ~~
      The token '&&' is not a valid statement separator in this version.
      Command failed with exit code: 1.
      

    docs/{en,zh}/reference/tools.md (## Shell) does not note that Windows SSH executes in PowerShell (where ; replaces && on Windows PowerShell 5.1 and concurrency classification stays serial).

Related: #5

Lingua principale
TypeScript
Stelle
54
Fork
5
Merge medio
2h 54m
PR unite (30g)
2

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di X-T-E-R/kiki

Tutte le issue di X-T-E-R/kiki

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.