@melandlabs/integrations-telegram 0.3.0 → 0.3.1

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,10 +1,10 @@
1
- import { homedir } from 'os';
2
1
  import { join } from 'path';
3
2
  import { loadChannelDay, saveChannelMessage, clearChannelConversationFromAllDays, clearChannelForUserPrefix } from '@melandlabs/ai/store';
3
+ import { getOpenContextPath } from '@melandlabs/env-config';
4
4
 
5
5
  // src/conversation-store.ts
6
6
  function getAppMemoryDir(userId) {
7
- const base = join(homedir(), ".opencontext", "data", "memory");
7
+ const base = getOpenContextPath("data", "memory");
8
8
  return userId ? join(base, userId) : base;
9
9
  }
10
10
  var TelegramConversationStore = class {
package/dist/index.js CHANGED
@@ -7,9 +7,9 @@ import { CustomFile } from 'telegram/client/uploads.js';
7
7
  import { StringSession } from 'telegram/sessions/index.js';
8
8
  import { Api } from 'telegram/tl/index.js';
9
9
  import MarkdownIt from 'markdown-it';
10
- import { homedir } from 'os';
11
10
  import { join } from 'path';
12
11
  import { loadChannelDay, saveChannelMessage, clearChannelConversationFromAllDays, clearChannelForUserPrefix } from '@melandlabs/ai/store';
12
+ import { getOpenContextPath } from '@melandlabs/env-config';
13
13
 
14
14
  var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
15
15
  get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
@@ -1669,7 +1669,7 @@ function tgMessageToopencontextMessage(message) {
1669
1669
  return messages;
1670
1670
  }
1671
1671
  function getAppMemoryDir(userId) {
1672
- const base = join(homedir(), ".opencontext", "data", "memory");
1672
+ const base = getOpenContextPath("data", "memory");
1673
1673
  return userId ? join(base, userId) : base;
1674
1674
  }
1675
1675
  var TelegramConversationStore = class {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@melandlabs/integrations-telegram",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
@@ -39,10 +39,11 @@
39
39
  "big-integer": "^1.6.52",
40
40
  "markdown-it": "^14.1.1",
41
41
  "telegram": "^2.26.22",
42
- "@melandlabs/ai": "0.3.0",
42
+ "@melandlabs/ai": "0.3.1",
43
+ "@melandlabs/env-config": "0.4.0",
44
+ "@melandlabs/shared": "0.3.0",
43
45
  "@melandlabs/integrations": "0.3.0",
44
- "@melandlabs/integrations-channels": "0.3.0",
45
- "@melandlabs/shared": "0.3.0"
46
+ "@melandlabs/integrations-channels": "0.3.0"
46
47
  },
47
48
  "devDependencies": {
48
49
  "typescript": "^5.6.3",