8000 feat: a plugin shows a thread's chat on its own screen by aorumbayev · Pull Request #169 · kagan-sh/kagan · GitHub
[go: up one dir, main page]

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
7 changes: 6 additions & 1 deletion .config/size-budget.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ target 35000
# Cost: the compact ThreadStatus adds 24 product lines on top of main (84175, after #154), in crates/ui/src/components: the shared method helpers and the compact call. The ceiling is set to the branch count, and decision 276 records it.
# Cost: ACP threads, one PR: product Rust went from main's 84147 to 90274 (+6127). Decision 279 records it.
# Cost: the chat refinements add 253 product lines on the branch (90274 before them): the fold row and its members, the composer's facts row, and the approval's move into the box's place. The ceiling is the merged count.
ceiling 90527
# Cost: the embedded chat adds 576 product lines on top of feat/acp-threads' 90527: the ThreadChat
# component and its compact card, the embed registry and the reply line, the chat's own CancelTurn
# and Start again, the chat-slot refusal, and the right panel's body that lets a chat fill it.
# Decision 287 records it, and the ceiling is set to the branch count.
ceiling 91103
allow_expect 9
crates/plugins/src/runtime/ui_host.rs 630
crates/ui/src/kagan/chat.rs 610
crates/ui/src/theme/catalog.rs 642
11 changes: 11 additions & 0 deletions crates/plugins/src/runtime/host/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,17 @@ impl PluginHost {
.is_some_and(|active| active.grant.powers.open_url)
}

#[must_use]
pub fn allows_chat(&self, id: &PluginId) -> bool {
self.active.get(id).is_some_and(|active| {
active
.grant
.powers
.areas
.contains(&crate::manifest::Area::Chat)
})
}

#[must_use]
pub fn installing(&self) -> Option<String> {
self.installing.borrow().clone()
Expand Down
Loading
Loading
0