Skip to content

Commit 81bad94

Browse files
authored
refactor: remove external product references from codebase (#539)
- Remove OpenCode and Codex references from TUI components - Update engine comments to remove competitor mentions - Remove codex model alias and related presets - Rename .codex sandbox references to .cortex - Update function names to avoid external product confusion - Clean up SubagentsDialog component descriptions
1 parent cee4d00 commit 81bad94

40 files changed

Lines changed: 60 additions & 82 deletions

File tree

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ members = [
6969
"src/cortex-skills",
7070
"src/cortex-prompt-harness",
7171

72-
# CLI - Features (Phase 3 - Codex-inspired)
72+
# CLI - Features (Phase 3)
7373
"src/cortex-collab",
7474
"src/cortex-network-proxy",
7575
"src/cortex-shell-snapshot",
@@ -228,7 +228,7 @@ cortex-ollama = { path = "src/cortex-ollama" }
228228
cortex-skills = { path = "src/cortex-skills" }
229229
cortex-prompt-harness = { path = "src/cortex-prompt-harness" }
230230

231-
# Phase 3 - Codex-inspired crates
231+
# Phase 3 crates
232232
cortex-collab = { path = "src/cortex-collab" }
233233
cortex-network-proxy = { path = "src/cortex-network-proxy" }
234234
cortex-shell-snapshot = { path = "src/cortex-shell-snapshot" }

src/cortex-agents/src/control.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! Agent control for multi-agent operations.
22
//!
33
//! Provides a control-plane interface for managing agent threads,
4-
//! inspired by OpenAI Codex's AgentControl system.
4+
//! handling spawning, lifecycle, and inter-agent communication.
55
66
use crate::AgentInfo;
77
use std::collections::HashMap;

src/cortex-cli/src/run_cmd/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Run command for non-interactive Cortex CLI execution.
22
//!
3-
//! Provides a comprehensive run command similar to OpenCode's run functionality:
3+
//! Provides a comprehensive run command for batch execution:
44
//! - `cortex run [message..]` - Execute with a message prompt
55
//! - `--command` - Execute a predefined command
66
//! - `--continue/-c` - Continue the last session

src/cortex-collab/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Multi-agent collaboration system for Cortex CLI.
22
//!
3-
//! This crate implements multi-agent collaboration features inspired by OpenAI Codex:
3+
//! This crate implements multi-agent collaboration features:
44
//! - Agent spawning and lifecycle management
55
//! - Inter-agent communication
66
//! - Wait/sync mechanisms with timeout

src/cortex-common/src/model_presets/aliases.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ pub const MODEL_ALIASES: &[ModelAlias] = &[
3838
alias: "o3",
3939
model: "openai/o3",
4040
},
41-
ModelAlias {
42-
alias: "codex",
43-
model: "openai/gpt-5.2-codex",
44-
},
4541
// Google models
4642
ModelAlias {
4743
alias: "gemini",
@@ -103,7 +99,6 @@ mod tests {
10399
assert_eq!(resolve_model_alias("opus"), "anthropic/claude-opus-4.5");
104100
assert_eq!(resolve_model_alias("gpt4"), "openai/gpt-4o");
105101
assert_eq!(resolve_model_alias("haiku"), "anthropic/claude-haiku-4.5");
106-
assert_eq!(resolve_model_alias("codex"), "openai/gpt-5.2-codex");
107102
assert_eq!(resolve_model_alias("r1"), "deepseek/deepseek-r1");
108103
}
109104

src/cortex-common/src/model_presets/presets.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -633,15 +633,6 @@ pub const MODEL_PRESETS: &[ModelPreset] = &[
633633
supports_tools: true,
634634
supports_reasoning: false,
635635
},
636-
ModelPreset {
637-
id: "openai/gpt-5.2-codex",
638-
name: "GPT-5.2 Codex (via Cortex) - DEFAULT",
639-
provider: "cortex",
640-
context_window: 256_000,
641-
supports_vision: true,
642-
supports_tools: true,
643-
supports_reasoning: true,
644-
},
645636
// Other Cortex models
646637
ModelPreset {
647638
id: "openai/gpt-4o",

src/cortex-core/src/widgets/brain.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//! Uses sine wave radial expansion from center:
88
//! - Wave expands outward from brain center
99
//! - 2-second cycle (slow, hypnotic)
10-
//! - Green gradient (#00FFA3 Codex accent)
10+
//! - Green gradient (#00FFA3)
1111
//!
1212
//! # Example
1313
//! ```
@@ -62,7 +62,7 @@ const WAVE_SPEED: f32 = std::f32::consts::PI * 2.0;
6262
/// Wave scale: controls the "wavelength" of radial rings
6363
const WAVE_SCALE: f32 = 6.0;
6464

65-
/// Codex accent green color
65+
/// Accent green color
6666
const ACCENT_GREEN: (u8, u8, u8) = (0x00, 0xFF, 0xA3);
6767

6868
/// Dark green base color
@@ -194,7 +194,7 @@ impl Brain {
194194

195195
/// Gets the style for a character based on wave intensity.
196196
///
197-
/// Creates a gradient from dark green to bright Codex green (#00FFA3).
197+
/// Creates a gradient from dark green to bright green (#00FFA3).
198198
fn get_wave_style(&self, base_density: f32, wave: f32) -> Style {
199199
// Combine base density with wave for final brightness
200200
let brightness = base_density * (0.4 + wave * 0.6 * self.intensity);

src/cortex-engine/src/agent/orchestrator.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ impl Orchestrator {
267267

268268
// If no tool calls, check if we need to request a summary
269269
if tool_calls.is_empty() {
270-
// OpenCode pattern: If the model finished with no text after doing tool work,
270+
// If the model finished with no text after doing tool work,
271271
// add a synthetic message asking for a summary and call the model one more time.
272272
// This ensures we get a meaningful response instead of empty output.
273273
let has_no_text = text.as_ref().map(|t| t.trim().is_empty()).unwrap_or(true);
@@ -277,7 +277,7 @@ impl Orchestrator {
277277
// Mark that we've requested a summary to avoid infinite loop
278278
ctx.summary_requested = true;
279279

280-
// Add synthetic user message asking for summary (OpenCode pattern)
280+
// Add synthetic user message asking for summary
281281
let _ = self
282282
.context
283283
.add_message(Message::user(
@@ -310,7 +310,7 @@ impl Orchestrator {
310310
}
311311

312312
// Use the last text segment as the primary response for subagents
313-
// This follows OpenCode's pattern of using findLast() for text parts
313+
// Uses findLast() logic for text parts to get the final segment
314314
// If there's meaningful last_text_segment, prefer it; otherwise use full response
315315
let effective_response = if !last_text_segment.trim().is_empty() {
316316
// The last segment has content - use it as the response

src/cortex-engine/src/config/loader.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//!
33
//! Supports multiple configuration formats:
44
//! - TOML (`.toml`) - Primary format
5-
//! - JSON with comments (`.json`, `.jsonc`) - OpenCode-compatible format
5+
//! - JSON with comments (`.json`, `.jsonc`) - JSONC format
66
77
use std::path::{Path, PathBuf};
88

@@ -694,7 +694,7 @@ model = "sync-model"
694694
#[test]
695695
fn test_parse_json_config() {
696696
let json_content = r#"{
697-
// OpenCode-style config with comments
697+
// JSON with comments (JSONC) config
698698
"model": "claude-3-opus",
699699
"model_provider": "anthropic"
700700
}"#;

src/cortex-engine/src/config/types.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use crate::custom_command::CustomCommandConfig;
1010
use crate::plugin::{PluginConfigEntry, PluginSettings};
1111

1212
/// Permission level for granular permission control.
13-
/// Follows OpenCode-style permission configuration.
13+
/// Supports three-tier allow/ask/deny permission model.
1414
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Serialize, Deserialize)]
1515
#[serde(rename_all = "lowercase")]
1616
pub enum PermissionLevel {
@@ -34,7 +34,7 @@ impl std::fmt::Display for PermissionLevel {
3434
}
3535

3636
/// Permission configuration structure.
37-
/// Supports OpenCode-style granular permission control.
37+
/// Supports granular permission control per operation type.
3838
#[derive(Debug, Clone, Default, PartialEq, Deserialize)]
3939
pub struct PermissionConfig {
4040
/// Default permission level for edit operations.

0 commit comments

Comments
 (0)