hiiro 0.1.329 → 0.1.331

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: f11dee5229dd7ac318ea2fb9dd34708b2ef67ae3de17255b3955a48bbb1cb61a
4
+ data.tar.gz: 1a1c968c127f4147e5c2bf454f914f0beedb748f935f1654f9614bd3305a8d1f
5
5
  SHA512:
6
- metadata.gz: 6e07ce5b25a90d86fe5e30e05c220f4ea7b4d6e798ff52ec4019ccf00b60ac67729e86bcbdbf6ce5d3eb65d314837b0a2582137bdf2f98d9c17eca2bf3103c5f
7
- data.tar.gz: b3110bcd79265fba7dd978ff976366f83998f7c276b0e9f95dccbdc3d06def05f56377d765bf0897abef22051ec60da9beb391b35ddc9a5f1621c0421af8a8f4
6
+ metadata.gz: 82f9174d0e60004e2708958a6563974aad8c60fbbd53dfe0b66102de04d602c6f1d7ecd1d72af877339ca1ca80ed6da4787938ca0892dde22b08ae2efa4ddcf3
7
+ data.tar.gz: e3e30740c63dfacc77964eaa72a257024524603fec6820f5501b1879a6d7739a4dec90dbf48698667b4d1c7cf7a4b536b5cd7e261947527e0be66299f965c1ba
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.331] - 2026-04-04
4
+
5
+ ### Fixed
6
+ - Strip whitespace from gem version output in queue watcher to prevent version comparison failures
7
+
8
+ ## [0.1.330] - 2026-04-04
9
+
10
+ ### Added
11
+ - `h queue add` now supports tmux session name prefix matching as fallback when task name doesn't match
12
+ - Queue editor now opens from the session's active pane directory when adding tasks via session reference
13
+
14
+ ### Changed
15
+ - Extract `session_info_for()` helper to resolve tmux sessions by prefix in queue prompt resolver
16
+
3
17
  ## [0.1.329] - 2026-04-03
4
18
 
5
19
  ### 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 == '---'
@@ -431,7 +443,7 @@ class Hiiro
431
443
  loop do
432
444
  loops += 1
433
445
  if current_version
434
- latest = `gem which hiiro`.sub(/.*hiiro-/, '').sub(/\/.*/, '') rescue nil
446
+ latest = `gem which hiiro`.sub(/.*hiiro-/, '').sub(/\/.*/, '').strip rescue nil
435
447
 
436
448
  if latest && latest != current_version
437
449
  puts "New hiiro version detected (#{latest}), restarting..."
@@ -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.331"
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.331
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Toyota