Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/cortex-tui/src/app/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::permissions::PermissionMode;
use crate::question::QuestionState;
use crate::selection::TextSelection;
use crate::views::tool_call::{ContentSegment, ToolCallDisplay};
use crate::widgets::ToastManager;
use crate::widgets::{ToastManager, ToastPosition};

use super::approval::{ApprovalState, PendingToolResult};
use super::autocomplete::AutocompleteState;
Expand Down Expand Up @@ -209,7 +209,7 @@ impl AppState {
// provider_picker removed: provider is now always "cortex"
model_picker: crate::widgets::ModelPickerState::new(),
text_selection: TextSelection::new(),
toasts: ToastManager::new(),
toasts: ToastManager::new().with_position(ToastPosition::BottomLeft),
permission_mode: PermissionMode::default(),
tool_calls: Vec::new(),
pending_tool_results: Vec::new(),
Expand Down
71 changes: 0 additions & 71 deletions src/cortex-tui/src/commands/registry/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -550,25 +550,7 @@ pub fn register_builtin_commands(registry: &mut CommandRegistry) {
true,
));

// NOTE: /provider and /providers are deprecated. Cortex is now a unified platform.
// These commands are hidden from help but still work (with deprecation warning).
registry.register(CommandDef::hidden(
"provider",
&["prov"],
"[Deprecated] Switch provider - Cortex is now a unified platform",
"/provider <name>",
CommandCategory::Model,
true,
));

registry.register(CommandDef::hidden(
"providers",
&["lp", "list-providers"],
"[Deprecated] List available providers - Cortex is now a unified platform",
"/providers",
CommandCategory::Model,
false,
));

registry.register(CommandDef::new(
"temperature",
Expand Down Expand Up @@ -601,44 +583,7 @@ pub fn register_builtin_commands(registry: &mut CommandRegistry) {
false,
));

// NOTE: /mcp-tools, /mcp-auth, /mcp-reload, /mcp-logs are deprecated.
// All MCP management is now centralized in the interactive /mcp panel.
// These commands are hidden but still work for backwards compatibility.
registry.register(CommandDef::hidden(
"mcp-tools",
&["tools", "lt"],
"[Deprecated] Use /mcp instead - List MCP tools",
"/mcp-tools [server]",
CommandCategory::Mcp,
true,
));

registry.register(CommandDef::hidden(
"mcp-auth",
&["auth"],
"[Deprecated] Use /mcp instead - Authenticate MCP server",
"/mcp-auth <server>",
CommandCategory::Mcp,
true,
));

registry.register(CommandDef::hidden(
"mcp-reload",
&["reload"],
"[Deprecated] Use /mcp instead - Reload MCP servers",
"/mcp-reload [server]",
CommandCategory::Mcp,
true,
));

registry.register(CommandDef::hidden(
"mcp-logs",
&[],
"[Deprecated] Use /mcp instead - View MCP server logs",
"/mcp-logs [server]",
CommandCategory::Mcp,
true,
));

// ========================================
// DEBUG COMMANDS
Expand Down Expand Up @@ -698,23 +643,7 @@ pub fn register_builtin_commands(registry: &mut CommandRegistry) {
false,
));

registry.register(CommandDef::hidden(
"crash",
&[],
"Test crash handler",
"/crash",
CommandCategory::Debug,
false,
));

registry.register(CommandDef::hidden(
"eval",
&[],
"Evaluate expression",
"/eval <expr>",
CommandCategory::Debug,
true,
));

// ========================================
// DEVELOPMENT & TOOLS COMMANDS
Expand Down
224 changes: 0 additions & 224 deletions src/cortex-tui/src/modal/alert.rs

This file was deleted.

2 changes: 0 additions & 2 deletions src/cortex-tui/src/modal/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ use ratatui::{
use std::path::PathBuf;

// Re-export modal implementations
pub mod alert;
pub mod commands;
pub mod help;
pub mod login;
Expand All @@ -25,7 +24,6 @@ pub mod providers;
pub mod sessions;
pub mod upgrade;

pub use alert::{AuthAlertModal, ProviderAlertModal};
pub use commands::CommandsModal;
pub use help::HelpModal;
pub use login::{LoginModal, LoginState};
Expand Down
4 changes: 1 addition & 3 deletions src/cortex-tui/src/runner/event_loop/modal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,7 @@ impl EventLoop {
}
}
ModalAction::ConfigureProvider(_provider_id) => {
use crate::modal::AuthAlertModal;
let alert = AuthAlertModal::new();
self.modal_stack.push(Box::new(alert));
self.app_state.toasts.warning("Please run `cortex login` to authenticate");
}
ModalAction::ExecuteCommand(cmd) => {
let cmd_str = if cmd.starts_with('/') {
Expand Down
6 changes: 2 additions & 4 deletions src/cortex-tui/src/runner/event_loop/streaming.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,8 @@ impl EventLoop {
self.app_state.queued_count()
);

// Open the authentication alert modal
use crate::modal::AuthAlertModal;
let alert = AuthAlertModal::new();
self.modal_stack.push(Box::new(alert));
// Show authentication required toast notification
self.app_state.toasts.error("Authentication required. Please run `cortex login` to authenticate.");
return Ok(());
}

Expand Down
Loading