mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-17 10:02:23 +00:00
Merge pull request #634 from ogulcancelik/fix/extension-context-model-getter
fix: custom footer extensions now see model changes
This commit is contained in:
commit
42ed0129ed
2 changed files with 5 additions and 1 deletions
|
|
@ -12,6 +12,7 @@
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- Session picker respects custom keybindings when using `--resume` ([#633](https://github.com/badlogic/pi-mono/pull/633) by [@aos](https://github.com/aos))
|
- Session picker respects custom keybindings when using `--resume` ([#633](https://github.com/badlogic/pi-mono/pull/633) by [@aos](https://github.com/aos))
|
||||||
|
- Custom footer extensions now see model changes: `ctx.model` is now a getter that returns the current model instead of a snapshot from when the context was created ([#634](https://github.com/badlogic/pi-mono/pull/634) by [@ogulcancelik](https://github.com/ogulcancelik))
|
||||||
|
|
||||||
## [0.42.5] - 2026-01-11
|
## [0.42.5] - 2026-01-11
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -307,13 +307,16 @@ export class ExtensionRunner {
|
||||||
* Context values are resolved at call time, so changes via initialize() are reflected.
|
* Context values are resolved at call time, so changes via initialize() are reflected.
|
||||||
*/
|
*/
|
||||||
createContext(): ExtensionContext {
|
createContext(): ExtensionContext {
|
||||||
|
const getModel = this.getModel;
|
||||||
return {
|
return {
|
||||||
ui: this.uiContext,
|
ui: this.uiContext,
|
||||||
hasUI: this.hasUI(),
|
hasUI: this.hasUI(),
|
||||||
cwd: this.cwd,
|
cwd: this.cwd,
|
||||||
sessionManager: this.sessionManager,
|
sessionManager: this.sessionManager,
|
||||||
modelRegistry: this.modelRegistry,
|
modelRegistry: this.modelRegistry,
|
||||||
model: this.getModel(),
|
get model() {
|
||||||
|
return getModel();
|
||||||
|
},
|
||||||
isIdle: () => this.isIdleFn(),
|
isIdle: () => this.isIdleFn(),
|
||||||
abort: () => this.abortFn(),
|
abort: () => this.abortFn(),
|
||||||
hasPendingMessages: () => this.hasPendingMessagesFn(),
|
hasPendingMessages: () => this.hasPendingMessagesFn(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue