mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-20 10:18:46 +03:00
fix(tui): use active model for compaction (#41608)
Co-authored-by: Aiden Cline <rekram1-node@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
Unverified
parent
c2b754bb03
commit
9c94634515
@@ -650,8 +650,18 @@ export function Session() {
|
||||
slash: {
|
||||
name: "compact",
|
||||
},
|
||||
run: () => {
|
||||
void client.api.session.compact({ sessionID: route.sessionID })
|
||||
run: async () => {
|
||||
const selection = local.model.current()
|
||||
if (selection)
|
||||
await client.api.session.switchModel({
|
||||
sessionID: route.sessionID,
|
||||
model: {
|
||||
providerID: selection.providerID,
|
||||
id: selection.modelID,
|
||||
variant: local.model.variant.current(),
|
||||
},
|
||||
})
|
||||
await client.api.session.compact({ sessionID: route.sessionID })
|
||||
dialog.clear()
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user