v1.5.4: Remove unused feature flags and oz-platform skill

Remove cloud/sharing feature flags (viewing_shared_sessions, shared_with_me,
session_sharing_acls, shared_block_title_generation, agent_shared_sessions,
cloud_environments, cloud_conversations, etc.) and classic_completions flags.
Remove oz-platform skill. Update blocklist views and drive index.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ryan Ward
2026-05-28 11:02:41 -05:00
co-authored by Claude Opus 4.6
parent 1fee031ea5
commit d9bdafed0a
8 changed files with 53 additions and 531 deletions
@@ -3239,6 +3239,7 @@ fn render_usage_button(props: Props, app: &AppContext) -> Box<dyn Element> {
let current_context = conversation.current_context_tokens();
let cache_read = conversation.total_cache_read_tokens();
let cache_write = conversation.total_cache_write_tokens();
let total_input = conversation.total_input_tokens();
let cost_cents = conversation.total_cost_cents();
let max_context: u32 = if context_usage > 0.0 {
@@ -3247,21 +3248,22 @@ fn render_usage_button(props: Props, app: &AppContext) -> Box<dyn Element> {
200_000
};
let context_pct = context_usage * 100.0;
let cache_total = cache_read + cache_write;
let cache_hit_pct = if cache_total > 0 {
(cache_read as f64 / cache_total as f64) * 100.0
let cache_total_ops = cache_read + cache_write + total_input;
let cache_hit_pct = if cache_total_ops > 0 {
(cache_read as f64 / cache_total_ops as f64) * 100.0
} else {
0.0
};
let usage_text = format!(
"Context: {:.1}% ({} / {}) | Cache: {:.1}% (R: {}, W: {}) | Cost: ${:.2}",
"Context: {:.1}% ({} / {}) | Cache Hit: {:.1}% (R: {}, W: {}, M: {}) | Cost: ${:.2}",
context_pct,
format_token_count(current_context),
format_token_count(max_context),
cache_hit_pct,
format_token_count(cache_read),
format_token_count(cache_write),
format_token_count(total_input),
cost_cents / 100.0,
);
@@ -280,15 +280,18 @@ impl ConversationUsageView {
));
}
// Cache hit rate: proportion of total input tokens served from cache
let total_input = self.usage_info.total_input_tokens;
if total_input > 0 && self.usage_info.total_cache_read_tokens > 0 {
// Cache hit rate: cache_reads / (cache_reads + cache_writes + cache_misses)
// where cache_misses = total_input_tokens (non-cached input)
let total_cache_ops = self.usage_info.total_cache_read_tokens
+ self.usage_info.total_cache_write_tokens
+ self.usage_info.total_input_tokens;
if total_cache_ops > 0 && self.usage_info.total_cache_read_tokens > 0 {
let hit_rate = (self.usage_info.total_cache_read_tokens as f32
/ total_input as f32)
/ total_cache_ops as f32)
* 100.0;
labels.push(render_label_text("Cache hit rate", appearance));
values.push(render_value_text(
format!("{:.0}%", hit_rate.min(100.0)),
format!("{:.1}%", hit_rate),
appearance,
));
}
+21 -2
View File
@@ -1051,6 +1051,24 @@ impl DriveIndex {
false
}
fn can_trash_or_delete(
&self,
cloud_object_type_and_id: &CloudObjectTypeAndId,
app: &AppContext,
) -> bool {
if let Some(object) = CloudModel::as_ref(app).get_by_uid(&cloud_object_type_and_id.uid()) {
if !object.metadata().has_pending_online_only_change() {
// Local-only objects can always be trashed/deleted.
if !cloud_object_type_and_id.has_server_id() {
return true;
}
// Server-synced objects require online connectivity.
return self.is_online(app);
}
}
false
}
fn is_online(&self, app: &AppContext) -> bool {
NetworkStatus::as_ref(app).is_online()
}
@@ -4357,6 +4375,7 @@ impl DriveIndex {
return menu_items;
};
let can_move_or_trash = self.online_only_operation_allowed(cloud_object_type_and_id, app);
let can_trash = self.can_trash_or_delete(cloud_object_type_and_id, app);
let cloud_view_model = CloudViewModel::as_ref(app);
let access_level = cloud_view_model.access_level(&cloud_object_type_and_id.uid(), app);
let editability = cloud_view_model.object_editability(&cloud_object_type_and_id.uid(), app);
@@ -4754,7 +4773,7 @@ impl DriveIndex {
}
}
if can_move_or_trash
if can_trash
&& (!FeatureFlag::SharedWithMe.is_enabled() || access_level.can_trash())
{
menu_items.push(
@@ -4823,7 +4842,7 @@ impl DriveIndex {
}
}
if self.online_only_operation_allowed(cloud_object_type_and_id, app) {
if self.can_trash_or_delete(cloud_object_type_and_id, app) {
if !FeatureFlag::SharedWithMe.is_enabled() || access_level.can_trash() {
menu_items.push(
MenuItemFields::new("Restore")
@@ -4211,12 +4211,14 @@ impl UpdateManager {
}
pub fn trash_object(&mut self, id: CloudObjectTypeAndId, ctx: &mut ModelContext<Self>) {
// // If the object isn't known to the server yet, we can't trash it.
let hashed_id = id.uid();
// If the object isn't known to the server, delete it permanently (no server-side trash).
let Some(server_id) = id.server_id() else {
self.delete_object_by_user(id, ctx);
return;
};
let hashed_id = id.uid();
// If there's a pending online-only operation for this object, don't trash it.
let Some(has_pending_online_only_operation) =
CloudModel::handle(ctx).read(ctx, |model, _| {