opencode-sesh 0.2.0 → 0.3.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.
package/bin/sesh.sh CHANGED
@@ -54,6 +54,17 @@ if [ "${1:-}" = --check ]; then
54
54
  exit 0
55
55
  fi
56
56
 
57
+ # Triage listing, not the picker: sessions with unanswered agent questions
58
+ # or runs stuck mid-tool. Never starts fzf or the refresh worker.
59
+ if [ "${1:-}" = --needs-input ]; then
60
+ shift
61
+ case "${1:-}" in
62
+ '') exec bash "$SCRIPT_DIR/sesh-waiting.sh" ;;
63
+ --json) exec bash "$SCRIPT_DIR/sesh-waiting.sh" --json ;;
64
+ *) echo "usage: sesh --needs-input [--json]" >&2; exit 2 ;;
65
+ esac
66
+ fi
67
+
57
68
  scope_value=''
58
69
  picker_limit=0
59
70
  picker_archived=0
@@ -90,6 +101,7 @@ q_list=$(shell_quote "$SCRIPT_DIR/sesh-list.sh")
90
101
  q_worker=$(shell_quote "$SCRIPT_DIR/sesh-refresh-worker.sh")
91
102
  q_preview=$(shell_quote "$SCRIPT_DIR/sesh-preview.sh")
92
103
  q_delete=$(shell_quote "$SCRIPT_DIR/sesh-delete.sh")
104
+ q_pins=$(shell_quote "$SCRIPT_DIR/sesh-pins.sh")
93
105
  q_shortcuts=$(shell_quote "$SCRIPT_DIR/sesh-shortcuts.sh")
94
106
  q_state=$(shell_quote "$state_dir")
95
107
  export SESH_LIST="$SCRIPT_DIR/sesh-list.sh"
@@ -119,6 +131,8 @@ preview_cmd="if [ -f $q_state/help ]; then $q_shortcuts; else $q_preview $q_stat
119
131
  help_bind="?:transform:[ -z {q} ] && ( [ -f $q_state/help ] && rm -f $q_state/help && echo hide-preview || ( : > $q_state/help && echo show-preview+refresh-preview ) ) || echo 'put(?)'"
120
132
  toggle_cmd="$q_list --toggle-scope --state-dir $q_state >/dev/null"
121
133
  delete_cmd="$q_delete $q_state {2}"
134
+ pin_session_cmd="$q_pins toggle-session {2}"
135
+ pin_directory_cmd="$q_pins toggle-directory {5}"
122
136
 
123
137
  query="$picker_query"
124
138
  while :; do
@@ -128,10 +142,12 @@ while :; do
128
142
  selection=$(FZF_DEFAULT_COMMAND='printf ""' FZF_DEFAULT_OPTS='' FZF_DEFAULT_OPTS_FILE='' "$SESH_FZF" --print-query --expect=ctrl-f --query="$query" --ansi --delimiter=$'\t' --with-nth=4 --track --id-nth=6 --disabled --layout=reverse --info=hidden --prompt='❯ ' \
129
143
  --preview="$preview_cmd" --preview-window='right,50%,wrap,hidden' \
130
144
  --header-first --header="$header_line" \
131
- --bind='space:transform:[ -z {q} ] && echo toggle-preview || echo "put( )"' \
145
+ --bind='ctrl-p:toggle-preview' \
132
146
  --bind="$help_bind" \
133
147
  --bind="ctrl-x:execute($delete_cmd)+transform-header($header_cmd)+reload($cache_cmd)" \
134
148
  --bind="ctrl-g:execute($toggle_cmd)+transform-header($header_cmd)+reload($cache_cmd)" \
149
+ --bind="alt-s:execute-silent($pin_session_cmd)+reload($cache_cmd)" \
150
+ --bind="alt-d:execute-silent($pin_directory_cmd)+reload($cache_cmd)" \
135
151
  --bind="change:reload:$cache_cmd" \
136
152
  --bind="start,every(3):transform-header($header_cmd)+reload-sync:$cache_cmd")
137
153
  status=$?
package/install.sh CHANGED
@@ -236,7 +236,9 @@ for path in \
236
236
  bin/sesh-list.sh \
237
237
  bin/sesh-preview.sh \
238
238
  bin/sesh-delete.sh \
239
+ bin/sesh-prune.sh \
239
240
  bin/sesh-refresh-worker.sh \
241
+ bin/sesh-waiting.sh \
240
242
  bin/sesh-shortcuts.sh \
241
243
  opencode/tools/sesh-list.ts \
242
244
  tui/sesh-panel.tsx \
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-sesh",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "type": "module",
5
5
  "description": "Browse, search, preview and resume opencode sessions from the terminal and the TUI.",
6
6
  "license": "MIT",