@inline-openclaw/inline 0.0.48 → 0.0.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -39206,10 +39206,9 @@ import {
39206
39206
  resolveThinkingDefault
39207
39207
  } from "openclaw/plugin-sdk/agent-runtime";
39208
39208
  import {
39209
- loadSessionStore,
39210
- resolveSessionStoreEntry,
39211
- resolveStorePath,
39212
- updateSessionStore
39209
+ getSessionEntry,
39210
+ patchSessionEntry,
39211
+ resolveStorePath
39213
39212
  } from "openclaw/plugin-sdk/session-store-runtime";
39214
39213
  import { applyModelOverrideToSessionEntry } from "openclaw/plugin-sdk/model-session-runtime";
39215
39214
  import { buildModelsProviderData } from "openclaw/plugin-sdk/models-provider-runtime";
@@ -46943,6 +46942,16 @@ function resolveInlineBlockStreamingEnabled(config2) {
46943
46942
  function shouldStartInlineProgressPlaceholderNow(line) {
46944
46943
  return typeof line === "object" && line?.kind === "patch" && Boolean(line.detail);
46945
46944
  }
46945
+ function resolveInlineParentSessionKeyCandidate(sessionKey, entry) {
46946
+ const explicit = normalizeOptionalString3(entry?.parentSessionKey);
46947
+ if (explicit && explicit !== sessionKey)
46948
+ return explicit;
46949
+ const inlineThreadMarker = ":inlineThread:";
46950
+ const markerIndex = sessionKey.lastIndexOf(inlineThreadMarker);
46951
+ if (markerIndex > 0)
46952
+ return sessionKey.slice(0, markerIndex);
46953
+ return;
46954
+ }
46946
46955
  function resolveInlineCommandMenuModelContext(params) {
46947
46956
  if (!params.sessionKey.trim()) {
46948
46957
  return {};
@@ -46953,8 +46962,11 @@ function resolveInlineCommandMenuModelContext(params) {
46953
46962
  cfg: params.cfg,
46954
46963
  agentId: params.agentId
46955
46964
  });
46956
- const store = loadSessionStore(storePath);
46957
- const entry = resolveSessionStoreEntry({ store, sessionKey: params.sessionKey }).existing;
46965
+ const entry = getSessionEntry({
46966
+ agentId: params.agentId,
46967
+ sessionKey: params.sessionKey,
46968
+ storePath
46969
+ });
46958
46970
  const thinkingLevel = normalizeOptionalString3(entry?.thinkingLevel);
46959
46971
  if (entry?.modelOverrideSource === "auto" && normalizeOptionalString3(entry.modelOverride)) {
46960
46972
  return {
@@ -46963,9 +46975,16 @@ function resolveInlineCommandMenuModelContext(params) {
46963
46975
  ...thinkingLevel ? { thinkingLevel } : {}
46964
46976
  };
46965
46977
  }
46978
+ const parentSessionKey = resolveInlineParentSessionKeyCandidate(params.sessionKey, entry);
46979
+ const parentEntry = parentSessionKey ? getSessionEntry({
46980
+ agentId: params.agentId,
46981
+ sessionKey: parentSessionKey,
46982
+ storePath
46983
+ }) : undefined;
46966
46984
  const override = resolveStoredModelOverride({
46967
46985
  ...entry ? { sessionEntry: entry } : {},
46968
- sessionStore: store,
46986
+ ...parentSessionKey ? { parentSessionKey } : {},
46987
+ ...parentSessionKey && parentEntry ? { sessionStore: { [parentSessionKey]: parentEntry } } : {},
46969
46988
  sessionKey: params.sessionKey,
46970
46989
  defaultProvider: defaultModel.provider
46971
46990
  });
@@ -49024,20 +49043,28 @@ Select a provider:`, providerButtons);
49024
49043
  agentId: route.agentId
49025
49044
  });
49026
49045
  const isDefaultSelection = selection.provider === resolvedDefault.provider && selection.model === resolvedDefault.model;
49027
- await updateSessionStore(storePath2, (store) => {
49028
- const entry = store[inboundSessionKey] ?? {
49046
+ await patchSessionEntry({
49047
+ agentId: route.agentId,
49048
+ sessionKey: inboundSessionKey,
49049
+ storePath: storePath2,
49050
+ fallbackEntry: {
49029
49051
  sessionId: inboundSessionKey,
49030
49052
  updatedAt: Date.now()
49031
- };
49032
- store[inboundSessionKey] = entry;
49033
- applyModelOverrideToSessionEntry({
49034
- entry,
49035
- selection: {
49036
- provider: selection.provider,
49037
- model: selection.model,
49038
- isDefault: isDefaultSelection
49039
- }
49040
- });
49053
+ },
49054
+ preserveActivity: true,
49055
+ replaceEntry: true,
49056
+ update: (entry) => {
49057
+ const next = { ...entry };
49058
+ applyModelOverrideToSessionEntry({
49059
+ entry: next,
49060
+ selection: {
49061
+ provider: selection.provider,
49062
+ model: selection.model,
49063
+ isDefault: isDefaultSelection
49064
+ }
49065
+ });
49066
+ return next;
49067
+ }
49041
49068
  });
49042
49069
  const actionText = isDefaultSelection ? "reset to default" : `changed to **${selection.provider}/${selection.model}**`;
49043
49070
  await deliverModelPickerEdit(`✅ Model ${actionText}
@@ -53149,5 +53176,5 @@ export {
53149
53176
  inlineChannelPlugin
53150
53177
  };
53151
53178
 
53152
- //# debugId=CDF7C9400CDE436B64756E2164756E21
53179
+ //# debugId=5CCCED703C8C65BB64756E2164756E21
53153
53180
  //# sourceMappingURL=channel-plugin-api.js.map