load and show claude settings including 1hr cache settings

This commit is contained in:
Josh Woodcock
2026-06-01 13:01:57 -05:00
parent 8c0a2d67cb
commit d862bbb048
11 changed files with 560 additions and 31 deletions
@@ -712,6 +712,9 @@ impl Input {
ctx.dispatch_typed_action(&TerminalAction::ToggleContextView);
}
}
_settings if command.name == commands::SETTINGS.name => {
ctx.dispatch_typed_action(&TerminalAction::ToggleSettingsView);
}
_fork if command.name == commands::FORK.name => {
let Some(conversation_id) = self
.ai_context_model
+38
View File
@@ -2589,6 +2589,9 @@ pub struct TerminalView {
/// View ID of the context window debug view, if visible.
context_view_id: Option<EntityId>,
/// View ID of the settings view, if visible.
settings_view_id: Option<EntityId>,
// Whether the block onboarding view is active or not.
block_onboarding_active: bool,
@@ -4093,6 +4096,7 @@ impl TerminalView {
rich_content_views: Vec::new(),
usage_footer_view_ids: Default::default(),
context_view_id: None,
settings_view_id: None,
block_onboarding_active: false,
onboarding_agentic_suggestions_block: None,
onboarding_prompt_block: None,
@@ -5792,6 +5796,36 @@ impl TerminalView {
ctx.notify();
}
fn toggle_settings_view(&mut self, ctx: &mut ViewContext<Self>) {
use crate::ai::bedrock::settings_view::SettingsView;
// If already showing, remove it
if let Some(view_id) = self.settings_view_id.take() {
let mut model = self.model.lock();
model.block_list_mut().remove_rich_content(view_id);
drop(model);
self.rich_content_views.retain(|rc| rc.view_id() != view_id);
ctx.notify();
return;
}
// Create and insert the settings view
let settings_view = ctx.add_view(|_| SettingsView::new());
let view_id = settings_view.id();
self.settings_view_id = Some(view_id);
self.insert_rich_content(
None,
settings_view,
None,
RichContentInsertionPosition::Append {
insert_below_long_running_block: true,
},
ctx,
);
ctx.notify();
}
/// Returns true if the window is wide enough to auto-open side panels.
pub fn can_auto_open_panel(&self) -> bool {
self.size_info.pane_width_px().as_f32() > MINIMUM_WIDTH_TO_AUTO_OPEN_PANE
@@ -24532,6 +24566,7 @@ impl TypedActionView for TerminalView {
| ExecuteRewindFromInlineMenu { .. }
| ToggleUsageFooter
| ToggleContextView
| ToggleSettingsView
| RevealChildAgent { .. }
| OpenCLIAgentRichInput
| ToggleSessionRecording => Empty,
@@ -25556,6 +25591,9 @@ impl TypedActionView for TerminalView {
ToggleContextView => {
self.toggle_context_view(ctx);
}
ToggleSettingsView => {
self.toggle_settings_view(ctx);
}
RevealChildAgent { conversation_id } => {
ctx.emit(Event::RevealChildAgent {
conversation_id: *conversation_id,
+3
View File
@@ -424,6 +424,8 @@ pub enum TerminalAction {
ToggleUsageFooter,
/// Toggle the context window debug view showing bedrock_message_history.
ToggleContextView,
/// Toggle the settings view showing Galaxy Bedrock configuration.
ToggleSettingsView,
/// Reveal a hidden child agent pane from the orchestrator status card.
RevealChildAgent {
conversation_id: AIConversationId,
@@ -705,6 +707,7 @@ impl fmt::Debug for TerminalAction {
AwsCliNotInstalledBanner(action) => write!(f, "AwsCliNotInstalledBanner({action:?})"),
ToggleUsageFooter => write!(f, "ToggleUsageFooter"),
ToggleContextView => write!(f, "ToggleContextView"),
ToggleSettingsView => write!(f, "ToggleSettingsView"),
RevealChildAgent { .. } => write!(f, "RevealChildAgent"),
ToggleSessionRecording => write!(f, "ToggleSessionRecording"),
OpenCLIAgentRichInput => write!(f, "OpenCLIAgentRichInput"),