@ycodium-ai/plugin-conversation 0.2.3122 → 0.2.3158

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.
Files changed (2) hide show
  1. package/dist/index.js +8 -16
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -12,8 +12,7 @@ import {
12
12
  function createCommands(input) {
13
13
  return [
14
14
  {
15
- type: "thread.create",
16
- commandId: input.commandId,
15
+ requestId: input.commandId,
17
16
  threadId: input.threadId,
18
17
  projectId: input.projectId,
19
18
  title: input.title,
@@ -21,8 +20,7 @@ function createCommands(input) {
21
20
  runtimeMode: input.runtimeMode,
22
21
  interactionMode: input.interactionMode,
23
22
  branch: null,
24
- worktreePath: null,
25
- createdAt: input.now
23
+ worktreePath: null
26
24
  },
27
25
  turnCommand({
28
26
  threadId: input.threadId,
@@ -52,12 +50,10 @@ function turnCommand(input) {
52
50
  }
53
51
  function forkCommand(input) {
54
52
  return {
55
- type: "thread.fork",
56
- commandId: input.commandId,
53
+ requestId: input.commandId,
57
54
  threadId: input.threadId,
58
55
  sourceThreadId: input.sourceThreadId,
59
- sourceMessageId: input.sourceMessageId,
60
- createdAt: input.now
56
+ sourceMessageId: input.sourceMessageId
61
57
  };
62
58
  }
63
59
  function titleFromText(text2) {
@@ -893,7 +889,7 @@ var SessionMapHub = class {
893
889
  return;
894
890
  }
895
891
  this.cards.set(threadId, projected);
896
- await this.ctx.sessionProjections.set({
892
+ await this.ctx.plugins.sessionProjections.set({
897
893
  name: PROJECTION_NAME,
898
894
  threadId,
899
895
  value: jsonValue(projected)
@@ -1269,7 +1265,6 @@ async function createSession(ctx, projectId, text2, refresh) {
1269
1265
  const project = await projectOrNull(ctx.projects, projectId);
1270
1266
  if (project === null) return { ok: false, code: "missing-project" };
1271
1267
  const selection = await ctx.providers.resolveSelection({ base: project.defaultModelSelection });
1272
- const now = (/* @__PURE__ */ new Date()).toISOString();
1273
1268
  const threadId = NodeCrypto.randomUUID();
1274
1269
  const [create, start] = createCommands({
1275
1270
  projectId,
@@ -1278,13 +1273,12 @@ async function createSession(ctx, projectId, text2, refresh) {
1278
1273
  modelSelection: selection.modelSelection,
1279
1274
  runtimeMode: "full-access",
1280
1275
  interactionMode: "default",
1281
- now,
1282
1276
  threadId,
1283
1277
  commandId: NodeCrypto.randomUUID(),
1284
1278
  messageId: NodeCrypto.randomUUID(),
1285
1279
  turnCommandId: NodeCrypto.randomUUID()
1286
1280
  });
1287
- await ctx.commands.dispatch(create);
1281
+ await ctx.threads.create(create);
1288
1282
  await ctx.threads.turns.start(start);
1289
1283
  refresh(threadId);
1290
1284
  return { ok: true, threadId, walkedBack: false };
@@ -1317,12 +1311,10 @@ async function forkSession(ctx, threadId, messageId, text2, refresh) {
1317
1311
  if (anchor === null) return { ok: false, code: "no-user-message" };
1318
1312
  const execution = await executionOf(ctx, threadId);
1319
1313
  const childId = NodeCrypto.randomUUID();
1320
- const now = (/* @__PURE__ */ new Date()).toISOString();
1321
- await ctx.commands.dispatch(
1314
+ await ctx.threads.fork(
1322
1315
  forkCommand({
1323
1316
  sourceThreadId: threadId,
1324
1317
  sourceMessageId: anchor.messageId,
1325
- now,
1326
1318
  threadId: childId,
1327
1319
  commandId: NodeCrypto.randomUUID()
1328
1320
  })
@@ -1368,7 +1360,7 @@ function abort(signal) {
1368
1360
  // src/index.ts
1369
1361
  var index_default = definePlugin({
1370
1362
  id: "conversation",
1371
- apiVersion: 13,
1363
+ apiVersion: 15,
1372
1364
  activate(ctx) {
1373
1365
  activateSessionMap(ctx);
1374
1366
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ycodium-ai/plugin-conversation",
3
- "version": "0.2.3122",
3
+ "version": "0.2.3158",
4
4
  "description": "The conversation surface: chat, trajectory, and session map, the input card, the queue, and turn navigation.",
5
5
  "keywords": [
6
6
  "chat",
@@ -41,10 +41,10 @@
41
41
  "tailwindcss": "^4.0.0",
42
42
  "typescript": "~6.0.3",
43
43
  "vite-plus": "0.2.2",
44
- "@ycodium-ai/plugin-api": "0.2.3122",
44
+ "ycodium-composer-tokens": "0.0.0",
45
+ "@ycodium-ai/plugin-api": "0.2.3158",
45
46
  "ycodium-system-text": "0.0.0",
46
- "ycodium-workspace-path": "0.0.0",
47
- "ycodium-composer-tokens": "0.0.0"
47
+ "ycodium-workspace-path": "0.0.0"
48
48
  },
49
49
  "ycodium": {
50
50
  "plugin": "./dist/index.js",