mirror of
https://github.com/openai/codex.git
synced 2026-04-29 17:06:51 +00:00
## `0.1.2504251709` ### 🚀 Features - Add openai model info configuration (#551) - Added provider to run quiet mode function (#571) - Create parent directories when creating new files (#552) - Print bug report URL in terminal instead of opening browser (#510) (#528) - Add support for custom provider configuration in the user config (#537) - Add support for OpenAI-Organization and OpenAI-Project headers (#626) - Add specific instructions for creating API keys in error msg (#581) - Enhance toCodePoints to prevent potential unicode 14 errors (#615) - More native keyboard navigation in multiline editor (#655) - Display error on selection of invalid model (#594) ### 🪲 Bug Fixes - Model selection (#643) - Nits in apply patch (#640) - Input keyboard shortcuts (#676) - `apply_patch` unicode characters (#625) - Don't clear turn input before retries (#611) - More loosely match context for apply_patch (#610) - Update bug report template - there is no --revision flag (#614) - Remove outdated copy of text input and external editor feature (#670) - Remove unreachable "disableResponseStorage" logic flow introduced in #543 (#573) - Non-openai mode - fix for gemini content: null, fix 429 to throw before stream (#563) - Only allow going up in history when not already in history if input is empty (#654) - Do not grant "node" user sudo access when using run_in_container.sh (#627) - Update scripts/build_container.sh to use pnpm instead of npm (#631) - Update lint-staged config to use pnpm --filter (#582) - Non-openai mode - don't default temp and top_p (#572) - Fix error catching when checking for updates (#597) - Close stdin when running an exec tool call (#636)
54 lines
1.4 KiB
TypeScript
54 lines
1.4 KiB
TypeScript
export const CLI_VERSION = "0.1.2504251709"; // Must be in sync with package.json.
|
|
export const ORIGIN = "codex_cli_ts";
|
|
|
|
export type TerminalChatSession = {
|
|
/** Globally unique session identifier */
|
|
id: string;
|
|
/** The OpenAI username associated with this session */
|
|
user: string;
|
|
/** Version identifier of the Codex CLI that produced the session */
|
|
version: string;
|
|
/** The model used for the conversation */
|
|
model: string;
|
|
/** ISO timestamp noting when the session was persisted */
|
|
timestamp: string;
|
|
/** Optional custom instructions that were active for the run */
|
|
instructions: string;
|
|
};
|
|
|
|
let sessionId = "";
|
|
|
|
/**
|
|
* Update the globally tracked session identifier.
|
|
* Passing an empty string clears the current session.
|
|
*/
|
|
export function setSessionId(id: string): void {
|
|
sessionId = id;
|
|
}
|
|
|
|
/**
|
|
* Retrieve the currently active session identifier, or an empty string when
|
|
* no session is active.
|
|
*/
|
|
export function getSessionId(): string {
|
|
return sessionId;
|
|
}
|
|
|
|
let currentModel = "";
|
|
|
|
/**
|
|
* Record the model that is currently being used for the conversation.
|
|
* Setting an empty string clears the record so the next agent run can update it.
|
|
*/
|
|
export function setCurrentModel(model: string): void {
|
|
currentModel = model;
|
|
}
|
|
|
|
/**
|
|
* Return the model that was last supplied to {@link setCurrentModel}.
|
|
* If no model has been recorded yet, an empty string is returned.
|
|
*/
|
|
export function getCurrentModel(): string {
|
|
return currentModel;
|
|
}
|