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 +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/hiiro/queue.rb +19 -1
- data/lib/hiiro/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cf012ee84bda195e2fc4a2955e427ef60da9b7f69c667fe855f2608058450e4f
|
|
4
|
+
data.tar.gz: 25ecf90d4b0dc4089808e3b414cb7ec1629fc9abdb54d05be27ad048f1aefe29
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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