- resolve the agent dir through the host getAgentDir() (registered by the composition root) instead of sniffing execPath/argv - synthesize agent_settled from the first terminal agent_end on omp - read the live model through ctx.models.current() and prefer it over the stored model on omp - adapt omp Settings (reloadFromDisk, global enabledModels) at the SDK boundary and drop scoped-model persistence on omp
This commit is contained in:
1 parent
52c9fbeaf3
commit
2aefc7ef5a
12 files changed
+232
-55
No files matched your search
@@ -51,6 +51,7 @@ type ActivePiModel = NonNullable<Pi.ExtensionContext["model"]>;
|
||||
// --- Extension Runtime ---
|
||||
|
||||
export default function (pi: Pi.ExtensionAPI) {
|
||||
Paths.setHostAgentDirResolver(Pi.getHostAgentDir);
|
||||
const piRuntime = Pi.createExtensionApiRuntimePorts(pi);
|
||||
const {
|
||||
getCommands,
|
||||
@@ -397,6 +398,7 @@ export default function (pi: Pi.ExtensionAPI) {
|
||||
const currentModelRuntime = Model.createCurrentModelRuntime({
|
||||
getContextModel,
|
||||
updateStatus,
|
||||
preferContextModel: Pi.isOmpHost(pi),
|
||||
});
|
||||
const queueMutationRuntime = Queue.createTelegramQueueMutationController({
|
||||
...telegramQueueStore,
|
||||
@@ -698,10 +700,12 @@ export default function (pi: Pi.ExtensionAPI) {
|
||||
resolveTimeLine: timeInjectionRuntime.resolveLine,
|
||||
getThinkingLevel,
|
||||
setThinkingLevel,
|
||||
persistScopedModelPatterns: Pi.createScopedModelPatternPersister({
|
||||
createSettingsManager: Pi.createSettingsManager,
|
||||
clearCachedModelMenuInputs: modelMenuRuntime.clearCachedInputs,
|
||||
}),
|
||||
persistScopedModelPatterns: Pi.isOmpHost(pi)
|
||||
? undefined
|
||||
: Pi.createScopedModelPatternPersister({
|
||||
createSettingsManager: Pi.createSettingsManager,
|
||||
clearCachedModelMenuInputs: modelMenuRuntime.clearCachedInputs,
|
||||
}),
|
||||
setModel,
|
||||
sendUserMessage,
|
||||
isIdle,
|
||||
|
||||
Reference in new issue
Block a user