mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
## Why Dedicated memories tools are exposed through a Responses API namespace tool. The namespace itself has to be a valid tool identifier, so `memories/` can fail validation before the model ever gets a chance to call the memory tools. ## What changed - Changed `MEMORY_TOOLS_NAMESPACE` from `memories/` to `memories`. - Added `memory_tool_namespace_matches_responses_api_identifier` so the namespace stays non-empty and limited to Responses-safe identifier characters. ## Verification - Added unit coverage for the namespace identifier shape in `codex-rs/ext/memories/src/tests.rs`.
26 lines
784 B
Rust
26 lines
784 B
Rust
mod backend;
|
|
mod extension;
|
|
mod local;
|
|
mod metrics;
|
|
mod prompts;
|
|
mod schema;
|
|
mod tools;
|
|
|
|
pub use extension::install;
|
|
|
|
pub(crate) const DEFAULT_LIST_MAX_RESULTS: usize = 2_000;
|
|
pub(crate) const MAX_LIST_RESULTS: usize = 2_000;
|
|
pub(crate) const DEFAULT_SEARCH_MAX_RESULTS: usize = 200;
|
|
pub(crate) const MAX_SEARCH_RESULTS: usize = 200;
|
|
pub(crate) const DEFAULT_READ_MAX_TOKENS: usize = 20_000;
|
|
pub(crate) const MEMORY_TOOL_DEVELOPER_INSTRUCTIONS_SUMMARY_TOKEN_LIMIT: usize = 2_500;
|
|
|
|
pub(crate) const MEMORY_TOOLS_NAMESPACE: &str = "memories";
|
|
pub(crate) const ADD_AD_HOC_NOTE_TOOL_NAME: &str = "add_ad_hoc_note";
|
|
pub(crate) const LIST_TOOL_NAME: &str = "list";
|
|
pub(crate) const READ_TOOL_NAME: &str = "read";
|
|
pub(crate) const SEARCH_TOOL_NAME: &str = "search";
|
|
|
|
#[cfg(test)]
|
|
mod tests;
|