TypeScript SDK rejects local image filenames beginning with a hyphen
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 82/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- cli
Direzione di ricerca
L’SDK costruisce gli argomenti CLI in sdk/typescript/src/exec.ts, intorno alle righe 173–180. Leggi la costruzione degli argomenti e individua i test degli argomenti per i turni nuovi e ripresi. Aggiorna la gestione degli argomenti delle immagini in modo che un nome di file che inizia con un trattino venga passato intatto, poi esegui quei test e conferma che coprono -sample.png.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What issue are you seeing?
A valid relative image filename beginning with - cannot be attached through the TypeScript SDK. The SDK passes --image and the filename as separate arguments, and the CLI interprets the filename as an option rather than the image value.
Reproduction
In a directory containing a valid PNG named -sample.png, run a turn with the SDK:
import { Codex } from "@openai/codex-sdk";
const thread = new Codex().startThread({
workingDirectory: process.cwd(),
skipGitRepoCheck: true,
});
await thread.run([
{ type: "text", text: "Describe this image." },
{ type: "local_image", path: "-sample.png" },
]);
The CLI exits with code 2 and reports that a value is required for --image. The failure happens before the model request. Changing the path to ./-sample.png is a workaround.
I reproduced this with the actual bundled SDK and Codex CLI 0.167.0-alpha.4.1 on Windows, using a local mock Responses server. normal.png and ./-sample.png completed and reached the mock; -sample.png failed before a request. As an independent control, codex exec --image=-sample.png ... accepted the same file and completed against the mock.
Expected behavior
The SDK should pass a literal path intact even when it starts with a hyphen. One option is to use the single-argument --image=<path> form; add fresh and resumed-turn argument tests. This is distinct from #60587, which concerns commas in image paths.
The SDK constructs the arguments here. Source checked at 6bfdc75f0d9e6fae313234f694839866d7c63c39.
- Lingua principale
- Rust
- Stelle
- 135k
- Fork
- 21.4k
- Merge medio
- 1m
- PR unite (30g)
- 995
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di openai/codex
-
bug CLI exec session
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
bug CLI config
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
app-server bug CLI
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
bug CLI exec
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
app-server bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di openai/codex
Issue simili
-
compatibility
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
aws/aws-emulator#30 · 1 commento ·
-
tormach-plasma refusal text with no machine reads "no machine is not declared a plasma machine"Apertaarea:post bug effort:low P2 source:agent
Difficoltà 1/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Higher Interval Candles draws nothing on a seconds chart whose interval does not divide two hoursApertabug studies
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
userFRM/egui-charts#2727 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement priority::low upstream
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
I maintainer di solito rispondono entro 1 giorno