opencode-sesh 2.0.0 → 2.0.2

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.
package/install.sh CHANGED
@@ -42,7 +42,7 @@ usage() {
42
42
  Usage: bash install.sh [--bin-dir DIR] [--no-tool] [--no-tui] [--uninstall]
43
43
 
44
44
  --bin-dir DIR Directory for the sesh launcher (default: ~/.local/bin).
45
- --no-tool Skip installing the sesh-list custom tool.
45
+ --no-tool Skip installing the sesh_list custom tool.
46
46
  --no-tui Skip installing the in-TUI sessions panel plugin.
47
47
  --uninstall Remove everything this script installed.
48
48
  --sync-panel Refresh an already-installed TUI panel only (used by postinstall).
@@ -314,7 +314,7 @@ fi
314
314
  "$LAUNCHER" --check || fail "post-install check failed."
315
315
  note "done"
316
316
  note " picker: run 'sesh' in any terminal, or '/sesh' inside opencode"
317
- note " sidebar: alt+o opens the full picker"
317
+ note " TUI: Option-O opens the full picker"
318
318
  note_restart
319
319
  case ":$PATH:" in
320
320
  *":$BIN_DIR:"*) ;;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-sesh",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "Browse, search, preview and resume opencode sessions from the terminal and the TUI.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -22,7 +22,8 @@
22
22
  "cli"
23
23
  ],
24
24
  "exports": {
25
- "./tui": "./tui-plugins/sesh-panel/tui.tsx",
25
+ ".": "./plugins/sesh-list.ts",
26
+ "./tui": "./dist/tui.js",
26
27
  "./tool": "./plugins/sesh-list.ts"
27
28
  },
28
29
  "bin": {
@@ -30,6 +31,7 @@
30
31
  },
31
32
  "files": [
32
33
  "bin/",
34
+ "dist/",
33
35
  "contrib/",
34
36
  "plugins/",
35
37
  "themes/",
@@ -50,8 +52,10 @@
50
52
  },
51
53
  "scripts": {
52
54
  "prepare": "husky",
53
- "test": "bash tests/sesh.sh && bash tests/changelog.sh",
54
- "test:unit": "bash tests/sesh.sh",
55
+ "build": "node scripts/build-tui.mjs",
56
+ "prepack": "node scripts/build-tui.mjs",
57
+ "test": "node scripts/build-tui.mjs && bash tests/sesh.sh && bash tests/changelog.sh",
58
+ "test:unit": "node scripts/build-tui.mjs && bash tests/sesh.sh",
55
59
  "test:changelog": "bash tests/changelog.sh",
56
60
  "test:picker": "python3 tests/picker.py",
57
61
  "typecheck": "tsc --noEmit",
@@ -61,11 +65,13 @@
61
65
  },
62
66
  "peerDependencies": {
63
67
  "@opencode/plugin": ">=2.0.0",
64
- "@opentui/core": "^0.5.8",
65
- "@opentui/solid": "^0.5.8",
68
+ "@opentui/core": ">=0.5.8",
69
+ "@opentui/solid": ">=0.5.8",
66
70
  "solid-js": ">=1.9.0"
67
71
  },
68
72
  "devDependencies": {
73
+ "@babel/core": "7.28.0",
74
+ "@babel/preset-typescript": "7.27.1",
69
75
  "@commitlint/cli": "^21.2.2",
70
76
  "@commitlint/config-conventional": "^21.2.2",
71
77
  "@opencode/client": "2.0.25",
@@ -74,7 +80,8 @@
74
80
  "@opentui/core": "^0.5.11",
75
81
  "@opentui/keymap": "^0.5.11",
76
82
  "@opentui/solid": "^0.5.11",
77
- "@types/node": "26.5.1",
83
+ "@types/node": "26.6.4",
84
+ "babel-preset-solid": "1.9.12",
78
85
  "husky": "^9.1.7",
79
86
  "solid-js": "1.9.15",
80
87
  "typescript": "7.0.2"
@@ -17,8 +17,8 @@ type ThemeColors = TuiPluginApi["theme"]["current"]
17
17
 
18
18
  let markdownStyleCache: { theme: ThemeColors; style: SyntaxStyle } | undefined
19
19
 
20
- function buildMarkdownStyle(theme: ThemeColors): SyntaxStyle {
21
- return SyntaxStyle.fromTheme([
20
+ function buildMarkdownStyle(theme: ThemeColors, owner?: unknown): SyntaxStyle {
21
+ return (SyntaxStyle as any).fromTheme([
22
22
  { scope: ["default"], style: { foreground: theme.text } },
23
23
  { scope: ["comment", "comment.documentation"], style: { foreground: theme.syntaxComment, italic: true } },
24
24
  { scope: ["string", "symbol", "character"], style: { foreground: theme.syntaxString } },
@@ -81,17 +81,17 @@ function buildMarkdownStyle(theme: ThemeColors): SyntaxStyle {
81
81
  },
82
82
  { scope: ["markup.link.label", "label"], style: { foreground: theme.markdownLinkText, underline: true } },
83
83
  { scope: ["conceal"], style: { foreground: theme.textMuted } },
84
- ])
84
+ ], owner)
85
85
  }
86
86
 
87
- function getMarkdownStyle(theme: ThemeColors): SyntaxStyle | undefined {
87
+ function getMarkdownStyle(theme: ThemeColors, owner?: unknown): SyntaxStyle | undefined {
88
88
  if (markdownStyleCache?.theme === theme) return markdownStyleCache?.style
89
89
  try {
90
- markdownStyleCache = { theme, style: buildMarkdownStyle(theme) }
90
+ markdownStyleCache = { theme, style: buildMarkdownStyle(theme, owner) }
91
91
  return markdownStyleCache?.style
92
92
  } catch {
93
93
  try {
94
- return SyntaxStyle.create()
94
+ return (SyntaxStyle as any).create(owner)
95
95
  } catch {
96
96
  return undefined
97
97
  }
@@ -907,10 +907,10 @@ function createTranscriptPreview(api: TuiPluginApi) {
907
907
  scrollbarOptions={{ visible: false }}
908
908
  maxHeight={Math.max(6, Math.floor(api.renderer.height / 2))}
909
909
  >
910
- {getMarkdownStyle(api.theme.current) ? (
910
+ {getMarkdownStyle(api.theme.current, (api.renderer as any)?.nativeSession) ? (
911
911
  <markdown
912
912
  content={previewText()}
913
- syntaxStyle={getMarkdownStyle(api.theme.current)!}
913
+ syntaxStyle={getMarkdownStyle(api.theme.current, (api.renderer as any)?.nativeSession)!}
914
914
  treeSitterClient={getTreeSitterClient()}
915
915
  />
916
916
  ) : (
@@ -2854,10 +2854,10 @@ const tui: TuiPlugin = async (api) => {
2854
2854
  <Show when={previewID()} fallback={<text style={{ fg: api.theme.current.textMuted }}>Select a session to preview</text>}>
2855
2855
  <Show when={previewText()} fallback={<text style={{ fg: api.theme.current.textMuted }}>Loading…</text>}>
2856
2856
  {(text: Accessor<string>) =>
2857
- getMarkdownStyle(api.theme.current) ? (
2857
+ getMarkdownStyle(api.theme.current, (api.renderer as any)?.nativeSession) ? (
2858
2858
  <markdown
2859
2859
  content={text()}
2860
- syntaxStyle={getMarkdownStyle(api.theme.current)!}
2860
+ syntaxStyle={getMarkdownStyle(api.theme.current, (api.renderer as any)?.nativeSession)!}
2861
2861
  treeSitterClient={getTreeSitterClient()}
2862
2862
  />
2863
2863
  ) : (
@@ -3294,6 +3294,9 @@ function createApi(ctx: Plugin.Context) {
3294
3294
  get currentFocusedEditor() {
3295
3295
  return ctx.renderer.currentFocusedEditor
3296
3296
  },
3297
+ get nativeSession() {
3298
+ return (ctx.renderer as any)?.nativeSession
3299
+ },
3297
3300
  on(event: string, handler: (...args: any[]) => void) {
3298
3301
  ctx.renderer.on(event, handler)
3299
3302
  },