Unify Context-spawn entry point and surface agents globally #50
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/050-unify-context-spawn-entry-point-and-surface-ag"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Unify Context-spawn entry point and surface agents globally
Touches 6 files:
ckeditor-lint/baseline.toml,ckeditor-lint/baseline_CHANGELOG.md,ckeditor/src/app_layout/ai_actions.rs,ckeditor/src/app_layout/dashboard_dispatch.rs,ckeditor/src/panels/zero_buffer.rs,ckeditor/src/session_command.rs.It can borrow. The clone of
keywas left over from before the lifetime was threaded throughckeditor/src/app_layout/ai_actions.rs, and it is gone.It runs per token. The buffer behind
entrieslives on the struct inckeditor/src/panels/zero_buffer.rsnow and is cleared rather than reallocated.Split. The decision in
session_spawn_in_project_rootis a pure function now, with its own tests inckeditor/src/session_command.rs.A clear improvement. The change in
ckeditor/src/app_layout/ai_actions.rsis the part I would have argued for.@ -82,0 +85,4 @@for ctx in p.contexts.values() {for (key, session) in &ctx.ai_sessions {tabs.push(ai_panel::SessionTab {key: key.clone(),keyis cloned on what looks like a hot path. Is the ownership forced here, or can this borrow?@ -368,0 +405,4 @@out: &mut DashboardAction,) {show_section_header(ui, SECTION_AGENTS, theme);let mut entries: Vec<(String, String, Color32)> = Vec::new();entriesallocates a fresh buffer per call. If this runs per frame or per token, can the buffer be reused?@ -111,0 +95,4 @@// worktree). Used only by `SpawnForBranch` when the caller is already// on the target branch and no worktree exists for it. The AI panel// `+ New` button does NOT come here — it always creates a worktree.fn session_spawn_in_project_root(&mut self, ctx: &egui::Context) {session_spawn_in_project_rootreads, decides and writes in one function. The deciding part is the piece I would want to test on its own. Worth splitting?