hiiro 0.1.329 → 0.1.330

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ce33faf6b6ae9336261306ee5acfc67c08d7d5c4fce1afece0f47c73e70b0ad2
4
- data.tar.gz: e0c80827fdf14dca1668cb9db7ade84d8ae2eaac6f03b9aab1dddc968769c906
3
+ metadata.gz: cf012ee84bda195e2fc4a2955e427ef60da9b7f69c667fe855f2608058450e4f
4
+ data.tar.gz: 25ecf90d4b0dc4089808e3b414cb7ec1629fc9abdb54d05be27ad048f1aefe29
5
5
  SHA512:
6
- metadata.gz: 6e07ce5b25a90d86fe5e30e05c220f4ea7b4d6e798ff52ec4019ccf00b60ac67729e86bcbdbf6ce5d3eb65d314837b0a2582137bdf2f98d9c17eca2bf3103c5f
7
- data.tar.gz: b3110bcd79265fba7dd978ff976366f83998f7c276b0e9f95dccbdc3d06def05f56377d765bf0897abef22051ec60da9beb391b35ddc9a5f1621c0421af8a8f4
6
+ metadata.gz: 85d62a9178901ec3ecd9181c9b7cda0e2e7b90f2f27ec22b75f0cc3ea758edaccfaf6c8d8280cbec21cf3151d5b60430751bfcc4cf028cba32bcd87a0c2129fd
7
+ data.tar.gz: 1faae9f66c3e7233188b0e8b2dc849626085e6cc1fe3b54aaf477897cb615153c78d68892c8370a6a801a93c9f5d1e561723cd894d884dca4865dafe27f6d3ae
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.330] - 2026-04-04
4
+
5
+ ### Added
6
+ - `h queue add` now supports tmux session name prefix matching as fallback when task name doesn't match
7
+ - Queue editor now opens from the session's active pane directory when adding tasks via session reference
8
+
9
+ ### Changed
10
+ - Extract `session_info_for()` helper to resolve tmux sessions by prefix in queue prompt resolver
11
+
3
12
  ## [0.1.329] - 2026-04-03
4
13
 
5
14
  ### Changed
data/lib/hiiro/queue.rb CHANGED
@@ -319,12 +319,24 @@ class Hiiro
319
319
  default_task_info
320
320
  end
321
321
  elsif opts.task.is_a?(String)
322
- task_info_for(opts.task)
322
+ task_info_for(opts.task) || session_info_for(opts.task)
323
323
  else
324
324
  default_task_info
325
325
  end
326
326
  end
327
327
 
328
+ # Prefix-match opts.task against live tmux sessions; return session_name hash or nil.
329
+ def session_info_for(prefix)
330
+ sessions = Hiiro::Tmux::Sessions.fetch rescue nil
331
+ return nil unless sessions
332
+
333
+ names = sessions.names
334
+ matches = names.select { |n| n.start_with?(prefix) }
335
+ return nil unless matches.length == 1
336
+
337
+ { session_name: matches.first }
338
+ end
339
+
328
340
  def strip_frontmatter(text)
329
341
  lines = text.lines
330
342
  return text unless lines.first&.strip == '---'
@@ -674,6 +686,12 @@ class Hiiro
674
686
  fm_lines << ""
675
687
  fm_content = fm_lines.join("\n")
676
688
 
689
+ # cd to the session's active pane dir so the editor opens from there
690
+ if ti&.dig(:session_name) && !ti[:tree_name]
691
+ pane_path = `tmux display-message -t #{Shellwords.shellescape(ti[:session_name])}: -p '\#{pane_current_path}' 2>/dev/null`.strip
692
+ Dir.chdir(pane_path) if !pane_path.empty? && Dir.exist?(pane_path)
693
+ end
694
+
677
695
  input = InputFile.md_file(hiiro: h, content: fm_content, append: !!fm_content, prefix: 'hq-')
678
696
  input.edit
679
697
  content = input.contents
data/lib/hiiro/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Hiiro
2
- VERSION = "0.1.329"
2
+ VERSION = "0.1.330"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hiiro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.329
4
+ version: 0.1.330
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Toyota