docs: add GPT-5 Codex guidelines for CLI usage - Added detailed guidelines for GPT-5 Codex in Codex CLI. - Expanded instructions on sandboxing, approvals, editing constraints, and style requirements. - Included presentation and response formatting best practices. fix(codex_instructions): update comparison logic to use prefix matching - Changed system instructions comparison to use `strings.HasPrefix` for improved flexibility.
Unified · Split
| @@ -20,7 +20,7 @@ func CodexInstructionsForModel(modelName, systemInstructions string) (bool, stri · 19 unmodified lines | |||
| 20 | // lastReviewPrompt := "" | 20 | // lastReviewPrompt := "" |
| 21 | for _, entry := range entries { | 21 | for _, entry := range entries { |
| 22 | content, _ := codexInstructionsDir.ReadFile("codex_instructions/" + entry.Name()) | 22 | content, _ := codexInstructionsDir.ReadFile("codex_instructions/" + entry.Name()) |
| 23 | if systemInstructions == string(content) { | 23 | if strings.HasPrefix(systemInstructions, string(content)) { |
| 24 | return true, "" | 24 | return true, "" |
| 25 | } | 25 | } |
| 26 | if strings.HasPrefix(entry.Name(), "gpt_5_codex_prompt.md") { | 26 | if strings.HasPrefix(entry.Name(), "gpt_5_codex_prompt.md") { |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
| @@ -6,7 +6,6 @@ import ( · 5 unmodified lines | |||
| 6 | "strings" | 6 | "strings" |
| 7 | 7 | ||
| 8 | "github.com/router-for-me/CLIProxyAPI/v6/internal/misc" | 8 | "github.com/router-for-me/CLIProxyAPI/v6/internal/misc" |
| 9 | log "github.com/sirupsen/logrus" | ||
| 10 | "github.com/tidwall/gjson" | 9 | "github.com/tidwall/gjson" |
| 11 | "github.com/tidwall/sjson" | 10 | "github.com/tidwall/sjson" |
| 12 | ) | 11 | ) |
| @@ -74,7 +73,7 @@ func ConvertOpenAIResponsesRequestToCodex(modelName string, inputRawJSON []byte, · 61 unmodified lines | |||
| 74 | if hasOfficialInstructions { | 73 | if hasOfficialInstructions { |
| 75 | return rawJSON | 74 | return rawJSON |
| 76 | } | 75 | } |
| 77 | log.Debugf("instructions not matched, %s\n", originalInstructions) | 76 | // log.Debugf("instructions not matched, %s\n", originalInstructions) |
| 78 | 77 | ||
| 79 | if len(inputResults) > 0 { | 78 | if len(inputResults) > 0 { |
| 80 | newInput := "[]" | 79 | newInput := "[]" |