dsh-multigameassistant 2.0.5 → 2.1.0

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.
@@ -1,14 +1,13 @@
1
1
  import { createRequire as __adgCreateRequire } from 'node:module'; import { dirname as __adgDirname } from 'node:path'; import { fileURLToPath as __adgFileURLToPath } from 'node:url'; const require = __adgCreateRequire(import.meta.url); const __filename = __adgFileURLToPath(import.meta.url); const __dirname = __adgDirname(__filename);
2
2
  import {
3
3
  convertRecord
4
- } from "./chunk-TD4YFQWE.js";
4
+ } from "./chunk-MEKSHT6V.js";
5
5
  import {
6
6
  writeFileAtomic
7
- } from "./chunk-CCAB6XXZ.js";
7
+ } from "./chunk-RESS7WVY.js";
8
8
  import {
9
9
  BY_YOU,
10
10
  NOTIFY_CAPABILITY,
11
- external_exports,
12
11
  isQuiet,
13
12
  parseRelay,
14
13
  parseTask,
@@ -21,7 +20,10 @@ import {
21
20
  threadMessage,
22
21
  threadReminder,
23
22
  threadsBetween
24
- } from "./chunk-BTT2GBTQ.js";
23
+ } from "./chunk-V2X4PLF5.js";
24
+ import {
25
+ external_exports
26
+ } from "./chunk-SHTX4AGU.js";
25
27
 
26
28
  // packages/notify/lib/index.js
27
29
  import { readFile } from "node:fs/promises";
@@ -464,9 +466,9 @@ function sessionConversations(sessions, cwd = () => void 0, focus, app) {
464
466
  handOffRefusal: (fromSession, to, fromAgent, toName) => desk().refusal(fromSession, to, fromAgent, toName),
465
467
  askRefusal: (sessionId) => desk().askRefusal(sessionId),
466
468
  async create(title, options = {}) {
467
- const chosen = options.role === void 0 ? void 0 : app?.()?.roleModel(options.role);
468
- const roleModel = chosen === void 0 ? void 0 : { provider: chosen.provider, model: chosen.model, ...chosen.reasoningEffort === void 0 ? {} : { reasoningEffort: chosen.reasoningEffort } };
469
- const model = roleModel ?? (options.defaultModel === true ? void 0 : await recentModel(sessions).catch(() => void 0));
469
+ const chosen = options.role === void 0 ? void 0 : app?.()?.agentModel(options.role);
470
+ const agentModel = chosen === void 0 ? void 0 : { provider: chosen.provider, model: chosen.model, ...chosen.reasoningEffort === void 0 ? {} : { reasoningEffort: chosen.reasoningEffort } };
471
+ const model = agentModel ?? (options.defaultModel === true ? void 0 : await recentModel(sessions).catch(() => void 0));
470
472
  const dir = cwd();
471
473
  const created = await sessions.create({ ...dir === void 0 ? {} : { cwd: dir }, ...app?.()?.sessionPreset() });
472
474
  await app?.()?.adopt(created.sessionId);
@@ -474,9 +476,11 @@ function sessionConversations(sessions, cwd = () => void 0, focus, app) {
474
476
  await app?.()?.tagSession(created.sessionId, options.role, options.by);
475
477
  await sessions.rename({ sessionId: created.sessionId, title }).catch(() => {
476
478
  });
477
- if (model !== void 0)
478
- await sessions.selectModel({ sessionId: created.sessionId, ...model }).catch(() => {
479
+ if (model !== void 0) {
480
+ const gateway2 = app?.();
481
+ await (gateway2?.selectSessionModel !== void 0 ? gateway2.selectSessionModel(created.sessionId, model) : sessions.selectModel({ sessionId: created.sessionId, ...model })).catch(() => {
479
482
  });
483
+ }
480
484
  if (options.focus !== void 0)
481
485
  await focus?.(created.sessionId, options.focus);
482
486
  return created.sessionId;