summaryrefslogtreecommitdiff
path: root/sib-ask
Commit message (Collapse)AuthorAgeFilesLines
* Update licenseHee-Suk Kim10 days1-1/+1
|
* Add LicenseHee-Suk Kim2026-08-051-0/+2
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* Fix error messageHee-Suk Kim2026-08-041-1/+1
| | | | | | -nc works and its actually documented. Signed-off-by: Hee-Suk Kim <[email protected]>
* Add some error guardsHee-Suk Kim2026-07-251-0/+3
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* Add shopts mannually for each scriptsHee-Suk Kim2026-07-251-0/+4
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* Kind error message on plm-send is failedHee-Suk Kim2026-07-241-5/+5
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* Change -s to -t, reserve -s for save current, not beforeHee-Suk Kim2026-07-241-4/+4
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* sib-ask: Fix rev-parse fail and die if HEAD was unbornHee-Suk Kim2026-07-211-3/+7
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* sib-ask: cmd_rev_parse only accepts one argHee-Suk Kim2026-07-211-1/+1
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* sib-ask: remove refs/sib/unborn check boilerplateHee-Suk Kim2026-07-211-16/+8
| | | | | | | Instead of checking based on the ref name, simply check and use --no-deref if it is an unborn ref. Signed-off-by: Hee-Suk Kim <[email protected]>
* sib-ask: die on network error and prevent HEAD changed on failureHee-Suk Kim2026-07-211-31/+32
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* sib-ask: use getopts to support short opt bundlingHee-Suk Kim2026-07-211-24/+21
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* sib-ask: drop unneeded main()Hee-Suk Kim2026-07-191-60/+55
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* nit cleanupHee-Suk Kim2026-07-181-2/+1
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* Drop refs/conv/scratch and set the detach state to defaultHee-Suk Kim2026-07-181-3/+14
| | | | | | | | | | | | | | | | | | | Currently, the default state inferred by save/switch is detached HEAD, and attach is a special state. However, if there is nothing in HEAD, Git throws a "fatal: not a git dir" error. This resulted in setting HEAD as refs/conv/scratch when init. Consequently, running `sib ask -n' attaches to refs/conv/scratch, while running `sib switch` detaches it, causing a problem of inconsistency. This commit resolved this by introducing a special ref called refs/sib/unborn to represent the ---new and init states, and by checking this in ask to ensure it becomes detached. The reason for changing the name of unborned state, aside from the processing in ask, is that conv/ has become the place where all saves go, so there should be no special indicator there. Signed-off-by: Hee-Suk Kim <[email protected]>
* sib-ask: change opt -t to -s and use sib save on itHee-Suk Kim2026-07-181-5/+4
| | | | | | This seems more natural and straightforward. Signed-off-by: Hee-Suk Kim <[email protected]>
* Prepare for release: add Makefile and dispatchHee-Suk Kim2026-07-171-1/+2
| | | | | | | | | | Similar to Git, scripts including the dispatcher sib are grouped into libexec/sib-core, and symlinks are created in bin/sib. Additionally, libexec/sib-core is added to the PATH when executing any script inside sib. I don't really see any downside to adding to the PATH and loading the script. It's clear. Signed-off-by: Hee-Suk Kim <[email protected]>
* Improve usage noteHee-Suk Kim2026-07-171-2/+2
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* sib-ask: implement -c, --only-chainHee-Suk Kim2026-07-071-2/+6
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* sib-ask: set HEAD as symref to conv/scratch on new conversationHee-Suk Kim2026-05-261-0/+4
| | | | | | | This prevents `--new' from overwriting a dialog ref when HEAD points to another dialog ref as a symref. Signed-off-by: Hee-Suk Kim <[email protected]>
* sib-ask: add reflog messagesHee-Suk Kim2026-05-251-3/+4
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* sib-ask: add -t, --tag supportHee-Suk Kim2026-05-251-1/+5
| | | | | | | The feature to set a ref on the current chain when starting a new turn is always useful. Signed-off-by: Hee-Suk Kim <[email protected]>
* Remove unneeded need_arg that didn't even work properlyHee-Suk Kim2026-05-191-7/+3
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* sib-ask: fix -p does not take effect when -r turned onHee-Suk Kim2026-05-191-11/+15
| | | | | | | The problem was that the HEAD update by -p depended on user input, so I just branched at that point. Signed-off-by: Hee-Suk Kim <[email protected]>
* sib-ask: implement -n, --new; start new conversationHee-Suk Kim2026-05-191-0/+8
| | | | | | | If you don't pass -p to chain-trace-json, it just creates the root chain. Also added comments because the code didn't seem very clear. Signed-off-by: Hee-Suk Kim <[email protected]>
* sib-ask: support option parsing retrieve from plm-askHee-Suk Kim2026-05-181-32/+55
| | | | | | | | | Excluded receiving the prompt as an argument because it increases code complexity. Besides, inputting from stdin is more convenient in the first place... Since it is difficult to distinguish between input blocking and API call blocking, print a warning message in that case. Signed-off-by: Hee-Suk Kim <[email protected]>
* Implement sib-askHee-Suk Kim2026-05-181-0/+35
It seems like there are quite a few bugs in edge cases. But for now, it works. Signed-off-by: Hee-Suk Kim <[email protected]>