aKode fase 2b-1: rimossi plugin remoti e share, bundle download, UI usage/crediti/banner/workspace ChatGPT; fix argomenti MCP (inviati vuoti dopo e4209e2) e overlay TUI; test analytics-upload rimossi; test sicurezza MCP adattati
Some checks failed
blocking-ci / Bazel (push) Has been cancelled
blocking-ci / Blob size policy (push) Has been cancelled
blocking-ci / cargo-deny (push) Has been cancelled
blocking-ci / Codespell (push) Has been cancelled
blocking-ci / repo-checks (push) Has been cancelled
blocking-ci / rust-ci (push) Has been cancelled
blocking-ci / sdk (push) Has been cancelled
blocking-ci / CI required (push) Has been cancelled
postmerge-ci / rust-ci-full (push) Has been cancelled
postmerge-ci / v8-canary (push) Has been cancelled
postmerge-ci / Postmerge CI results (push) Has been cancelled
Some checks failed
blocking-ci / Bazel (push) Has been cancelled
blocking-ci / Blob size policy (push) Has been cancelled
blocking-ci / cargo-deny (push) Has been cancelled
blocking-ci / Codespell (push) Has been cancelled
blocking-ci / repo-checks (push) Has been cancelled
blocking-ci / rust-ci (push) Has been cancelled
blocking-ci / sdk (push) Has been cancelled
blocking-ci / CI required (push) Has been cancelled
postmerge-ci / rust-ci-full (push) Has been cancelled
postmerge-ci / v8-canary (push) Has been cancelled
postmerge-ci / Postmerge CI results (push) Has been cancelled
This commit is contained in:
@@ -10,16 +10,11 @@
|
||||
|
||||
use std::path::PathBuf;
|
||||
use std::sync::Arc;
|
||||
use std::sync::atomic::AtomicBool;
|
||||
use std::time::Duration;
|
||||
use tokio_util::sync::CancellationToken;
|
||||
|
||||
use crate::inline_visualization::InlineVisualizationContext;
|
||||
use codex_app_server_protocol::AddCreditsNudgeCreditType;
|
||||
use codex_app_server_protocol::AddCreditsNudgeEmailStatus;
|
||||
use codex_app_server_protocol::ConsumeAccountRateLimitResetCreditResponse;
|
||||
use codex_app_server_protocol::DynamicToolCallResponse;
|
||||
use codex_app_server_protocol::GetAccountRateLimitsResponse;
|
||||
use codex_app_server_protocol::MarketplaceAddResponse;
|
||||
use codex_app_server_protocol::MarketplaceRemoveResponse;
|
||||
use codex_app_server_protocol::MarketplaceUpgradeResponse;
|
||||
@@ -57,7 +52,6 @@ use crate::bottom_pane::TerminalTitleItem;
|
||||
use crate::chatwidget::AstraModelPickerAction;
|
||||
use crate::chatwidget::ConfiguredPetLoadGeneration;
|
||||
use crate::chatwidget::ConnectorScopeGeneration;
|
||||
use crate::chatwidget::ThreadUsageOutcome;
|
||||
use crate::chatwidget::UserMessage;
|
||||
use crate::experimental_features::FeatureWriteResult;
|
||||
use crate::goal_files::GoalDraft;
|
||||
@@ -211,36 +205,6 @@ pub(crate) struct PluginRemoteSectionError {
|
||||
pub(crate) message: String,
|
||||
}
|
||||
|
||||
/// Distinguishes why a rate-limit refresh was requested so the completion
|
||||
/// handler can route the result correctly.
|
||||
///
|
||||
/// A `StartupPrefetch` fires once, concurrently with the rest of TUI init, and
|
||||
/// updates the cached snapshots and any available reset-credit notice (no
|
||||
/// status card to finalize). A `StatusCommand` is tied to a specific `/status`
|
||||
/// invocation and must call `finish_status_rate_limit_refresh` when done so the
|
||||
/// card stops showing a "refreshing" state. A `UsageMenu` refreshes a cached
|
||||
/// zero reset count so the disabled menu entry can become available without a
|
||||
/// restart. A `ResetPicker` refreshes the rate limits and detailed reset-credit
|
||||
/// rows before showing redemption choices.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub(crate) enum RateLimitRefreshOrigin {
|
||||
/// Eagerly fetched after bootstrap for `/status` data and reset availability.
|
||||
StartupPrefetch { reset_hint_request_id: u64 },
|
||||
/// User-initiated via `/status`; the `request_id` correlates with the
|
||||
/// status card that should be updated when the fetch completes.
|
||||
StatusCommand { request_id: u64 },
|
||||
/// User reopened `/usage` while the cached reset-credit count was zero.
|
||||
UsageMenu { request_id: u64 },
|
||||
/// User opened the reset-credit picker.
|
||||
ResetPicker { request_id: u64 },
|
||||
/// Refresh requested after a reset credit was successfully consumed.
|
||||
ResetConsume { request_id: u64 },
|
||||
/// Refresh backend recovery after an inference limit error.
|
||||
Recovery,
|
||||
/// Background account usage read, scheduled more frequently near exhaustion.
|
||||
Periodic,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub(crate) enum KeymapEditIntent {
|
||||
ReplaceAll,
|
||||
@@ -860,16 +824,6 @@ pub(crate) enum AppEvent {
|
||||
matches: Vec<crate::task_mentions::TaskMention>,
|
||||
},
|
||||
|
||||
/// Refresh account rate limits in the background.
|
||||
RefreshRateLimits {
|
||||
origin: RateLimitRefreshOrigin,
|
||||
},
|
||||
|
||||
/// Reconcile inherited account usage with an attached task before its queued input runs.
|
||||
ApplyBackendBannerFallback {
|
||||
thread_id: ThreadId,
|
||||
},
|
||||
|
||||
/// Open the current thread goal summary/action menu.
|
||||
OpenThreadGoalMenu {
|
||||
thread_id: ThreadId,
|
||||
@@ -898,46 +852,6 @@ pub(crate) enum AppEvent {
|
||||
thread_id: ThreadId,
|
||||
},
|
||||
|
||||
/// Result of refreshing rate limits.
|
||||
RateLimitsLoaded {
|
||||
request_id: u64,
|
||||
origin: RateLimitRefreshOrigin,
|
||||
hard_stop_generation: u64,
|
||||
result: Result<GetAccountRateLimitsResponse, String>,
|
||||
},
|
||||
|
||||
/// Open the authenticated account analytics dashboard.
|
||||
OpenAnalytics {
|
||||
view: Option<crate::analytics::TokenActivityView>,
|
||||
},
|
||||
|
||||
/// Open the reset-credit flow selected from the `/usage` menu.
|
||||
OpenRateLimitResetCredits,
|
||||
|
||||
/// Confirm the reset credit selected from the reset-credit picker.
|
||||
OpenRateLimitResetConfirmation {
|
||||
picker_request_id: u64,
|
||||
confirmation_gate: Arc<AtomicBool>,
|
||||
credit_id: Option<String>,
|
||||
reset_title: String,
|
||||
reset_detail: Option<String>,
|
||||
reset_description: String,
|
||||
},
|
||||
|
||||
/// Consume one reset credit using a stable idempotency key.
|
||||
ConsumeRateLimitResetCredit {
|
||||
idempotency_key: String,
|
||||
credit_id: Option<String>,
|
||||
},
|
||||
|
||||
/// Result of consuming one reset credit.
|
||||
RateLimitResetCreditConsumed {
|
||||
request_id: u64,
|
||||
idempotency_key: String,
|
||||
credit_id: Option<String>,
|
||||
result: Result<ConsumeAccountRateLimitResetCreditResponse, String>,
|
||||
},
|
||||
|
||||
/// Restore the displayed thread's live terminals after replaying its history.
|
||||
RestoreBackgroundTerminals(ThreadId),
|
||||
BackgroundTerminalsLoaded {
|
||||
@@ -945,48 +859,6 @@ pub(crate) enum AppEvent {
|
||||
terminals: Vec<codex_app_server_protocol::ThreadBackgroundTerminal>,
|
||||
},
|
||||
|
||||
/// Fetch backend-estimated usage for the currently visible enterprise thread.
|
||||
RefreshThreadUsage {
|
||||
thread_id: ThreadId,
|
||||
request_id: u64,
|
||||
},
|
||||
|
||||
/// Result of fetching backend-estimated usage for a specific thread.
|
||||
ThreadUsageLoaded {
|
||||
thread_id: ThreadId,
|
||||
request_id: u64,
|
||||
result: Result<ThreadUsageOutcome, String>,
|
||||
},
|
||||
|
||||
/// Result of fetching usage for the selected dashboard task.
|
||||
AgentsOverviewUsageLoaded {
|
||||
thread_id: ThreadId,
|
||||
request_id: Uuid,
|
||||
result: Result<ThreadUsageOutcome, String>,
|
||||
},
|
||||
|
||||
/// Fetch workspace messages for the status-line headline item.
|
||||
RefreshStatusLineWorkspaceHeadline {
|
||||
request_id: u64,
|
||||
},
|
||||
|
||||
/// Commit settled asynchronous usage output after active-output barriers clear.
|
||||
CommitPendingUsageOutput,
|
||||
|
||||
/// Commit settled asynchronous usage output after stream shutdown.
|
||||
CommitPendingUsageOutputAfterStreamShutdown,
|
||||
|
||||
/// Send a user-confirmed request to notify the workspace owner.
|
||||
SendAddCreditsNudgeEmail {
|
||||
credit_type: AddCreditsNudgeCreditType,
|
||||
},
|
||||
|
||||
/// Result of notifying the workspace owner.
|
||||
AddCreditsNudgeEmailFinished {
|
||||
request_id: Uuid,
|
||||
result: Result<AddCreditsNudgeEmailStatus, String>,
|
||||
},
|
||||
|
||||
/// Result of prefetching connectors.
|
||||
ConnectorsLoaded {
|
||||
thread_id: Option<ThreadId>,
|
||||
@@ -1387,12 +1259,6 @@ pub(crate) enum AppEvent {
|
||||
/// Update the current reasoning effort in the running app and widget.
|
||||
UpdateReasoningEffort(Option<ReasoningEffort>),
|
||||
|
||||
/// Change Reserve effort only on the task that opened the picker, without saving defaults.
|
||||
UpdateLunaReserveReasoning {
|
||||
thread_id: ThreadId,
|
||||
effort: Option<ReasoningEffort>,
|
||||
},
|
||||
|
||||
/// Update the current model slug in the running app and widget.
|
||||
UpdateModel(String),
|
||||
|
||||
@@ -1806,11 +1672,6 @@ pub(crate) enum AppEvent {
|
||||
cwd: PathBuf,
|
||||
summary: crate::chatwidget::StatusLineGitSummary,
|
||||
},
|
||||
/// Async update of the workspace notification headline for status line rendering.
|
||||
StatusLineWorkspaceHeadlineUpdated {
|
||||
request_id: u64,
|
||||
result: Result<crate::workspace_messages::WorkspaceHeadlineFetchResult, String>,
|
||||
},
|
||||
/// Apply a user-confirmed status-line item ordering/selection.
|
||||
StatusLineSetup {
|
||||
items: Vec<StatusLineItem>,
|
||||
|
||||
Reference in New Issue
Block a user