summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* sib-switch: add option -s and use getopts for opt parsingHee-Suk Kim2026-07-191-15/+18
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* sib-switch: change -s to -fHee-Suk Kim2026-07-191-4/+4
| | | | | | -s is used as save on sib-ask Signed-off-by: Hee-Suk Kim <[email protected]>
* Makefile: hardcode SUFFIXHee-Suk Kim2026-07-181-6/+4
| | | | | | sudo make PREFIX= SUFFIX= uninstall was pure nightmare... Signed-off-by: Hee-Suk Kim <[email protected]>
* sib-status: print ref informations and chain summary tooHee-Suk Kim2026-07-182-10/+70
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* nit cleanupHee-Suk Kim2026-07-181-2/+1
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* sib-edit: changed to output the modified chain and update HEADHee-Suk Kim2026-07-181-1/+4
| | | | | | | | | | | | | In any case, the intention was to change the HEAD when running sib-edit. The user's choice is whether to use the edited chain, the HEAD, or the one in between. The option to select the one in between does not need to be provided here, and it is more natural to have the HEAD updated to a new HEAD and the modified chain output rather than the chain being shortened. With this change `sib ask -p $(sib edit abcdefu) -r' could be used. Signed-off-by: Hee-Suk Kim <[email protected]>
* Drop refs/conv/scratch and set the detach state to defaultHee-Suk Kim2026-07-182-4/+15
| | | | | | | | | | | | | | | | | | | 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-save: add -l to list savesHee-Suk Kim2026-07-181-3/+16
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* sib-ask: change opt -t to -s and use sib save on itHee-Suk Kim2026-07-182-5/+6
| | | | | | This seems more natural and straightforward. Signed-off-by: Hee-Suk Kim <[email protected]>
* Implement sib-saveHee-Suk Kim2026-07-181-0/+57
| | | | | | | | The default state is detached, and sib-switch -s makes HEAD 'attached'. It is recommended to explicitly save the conversation with sib-save while in the detached state. Signed-off-by: Hee-Suk Kim <[email protected]>
* sib-switch: improve usage messageHee-Suk Kim2026-07-181-6/+4
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* sib-show: add -c flag, same as -k contentHee-Suk Kim2026-07-181-11/+13
| | | | | | Parse -k and -k KEY and -k HEAD is basically bad definition. Signed-off-by: Hee-Suk Kim <[email protected]>
* sib-switch: fix git ls-trace error printed for empty traceHee-Suk Kim2026-07-181-9/+14
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* Restore NAME variable in lib.bashHee-Suk Kim2026-07-181-0/+2
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* Enable reinitialize on init, do not delete heads and tags dirsHee-Suk Kim2026-07-181-7/+9
| | | | | | | | | | | | The mere existence of the heads/ and tags/ directories didn't seem to be a significant issue (they are empty directories anyway and can be created if the user wants them), so remaining that. If they are deleted during reinit, user data could be erased. While it is possible to check for the existence of files within the directories and delete them, I don't think it is necessary to go to such lengths. Signed-off-by: Hee-Suk Kim <[email protected]>
* Prepare for release: add Makefile and dispatchHee-Suk Kim2026-07-178-21/+55
| | | | | | | | | | 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]>
* Change git author nameHee-Suk Kim2026-07-171-2/+2
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* sib: implement sib-statusHee-Suk Kim2026-07-171-0/+10
| | | | 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-show: nit: update usageHee-Suk Kim2026-07-071-2/+3
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* sib-show: implement -k <key>Hee-Suk Kim2026-06-072-1/+10
| | | | | | | Early return when -k given doesn't look ideal, but making it would more expensive. Think about it later maybe? Signed-off-by: Hee-Suk Kim <[email protected]>
* sib-show: drop parent printing and simplify codeHee-Suk Kim2026-06-071-15/+5
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* Fix update-ref not making reflog for refs/convHee-Suk Kim2026-06-072-3/+2
| | | | | | | | | core.logAllRefUpdates creates new log files only for refs in refs/heads or refs/remotes. It is meaningless so exclude it during init and use the --create-reflog to make all update-refs generate reflogs. Signed-off-by: Hee-Suk Kim <[email protected]>
* TODO: updateHee-Suk Kim2026-06-061-0/+7
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* sib-edit: add early return and improve error handlingHee-Suk Kim2026-06-061-2/+8
| | | | | | | | Opt to return immediately in the editor when the file has not changed. I didn't want to change the existing code, so just use tee to load oldblob in the middle and compared it with cat. Signed-off-by: Hee-Suk Kim <[email protected]>
* TODO: updateHee-Suk Kim2026-06-061-0/+1
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* sib-edit: implement HEAD to argument rebaseHee-Suk Kim2026-06-062-4/+67
| | | | 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-switch: fix symbolic-ref arg orderHee-Suk Kim2026-05-261-2/+2
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* nit: update TODOHee-Suk Kim2026-05-251-2/+2
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* sib: detached-friendly setup with conv/scratch defaultHee-Suk Kim2026-05-251-0/+2
| | | | | | | | | | | | | | | | Replace git's default refs/heads/master HEAD with refs/conv/scratch, matching sib's namespace convention. Remove refs/heads and refs/tags directories since sib doesn't use them — keeps the repo layout minimal and signals intent that branches/tags aren't part of the model. Use `echo' instead of the `symbolic-ref' command because using it pollutes the reflog, and I separated them because using the `--branch' command during init forces the refs/heads prefix. Need to use it more to know for sure, but it seems like strict Git-style branch/tag separation isn't really necessary. Signed-off-by: Hee-Suk Kim <[email protected]>
* sib-switch: implementHee-Suk Kim2026-05-252-1/+42
| | | | | | | | The reason there is no distinction like heads or tags is that, unlike Git, there is no need to differentiate between the two. When user set a checkpoint, it can be promoted to a conversation session. 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]>
* sib: dont fix git author date when creating chainHee-Suk Kim2026-05-252-3/+2
| | | | | | | | | Basically, it is good to have the timestamp recorded somewhere. If you record it in the trace, the reproducibility—which was the purpose of fixing it—is lost anyway, also setting it with 0000 makes reflog invisable with ./sib git reflog. Signed-off-by: Hee-Suk Kim <[email protected]>
* scripts: add st-prompt.pyHee-Suk Kim2026-05-252-0/+106
| | | | | | | A helper script that makes it easy to input JSON from the sillytavern prompt into the sib chain-jsonl command. Signed-off-by: Hee-Suk Kim <[email protected]>
* sib: implement chain-jsonlHee-Suk Kim2026-05-251-0/+19
| | | | | | | This generates a chain from jsonl. Likely to be used to import prompts or other conversations into the sib repository mainly. Signed-off-by: Hee-Suk Kim <[email protected]>
* sib-show: drop glowHee-Suk Kim2026-05-251-5/+3
| | | | | | | Again, let's think about complex things like rendering later. It is actually uncomfortable to read when Markdown is incomplete. Signed-off-by: Hee-Suk Kim <[email protected]>
* nit: add rc.bash to gitignoreHee-Suk Kim2026-05-251-1/+2
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* plm-wrap: remove tsHee-Suk Kim2026-05-201-5/+3
| | | | | | This is the quirk from when I made the plm previously. Signed-off-by: Hee-Suk Kim <[email protected]>
* plm-wrap: add generation parameters supportHee-Suk Kim2026-05-201-3/+16
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* Update TODOHee-Suk Kim2026-05-191-1/+3
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* sib-show: replace grep with exact pattern matching using awkHee-Suk Kim2026-05-191-7/+5
| | | | | | | The existing implementation also filters out content in the middle of the key. Signed-off-by: Hee-Suk Kim <[email protected]>
* sib-show: drop jq dependancyHee-Suk Kim2026-05-191-10/+16
| | | | | | | Since sib json series internally call sib ls-trace and such anyway, doing it this way is much faster. Signed-off-by: Hee-Suk Kim <[email protected]>
* sib-show: simplify output renderingHee-Suk Kim2026-05-191-15/+8
| | | | | | It'll be best to think things like nice printing later. Signed-off-by: Hee-Suk Kim <[email protected]>
* Remove unneeded need_arg that didn't even work properlyHee-Suk Kim2026-05-194-11/+7
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* sib-send: modified to output SSE with fd 3Hee-Suk Kim2026-05-191-4/+13
| | | | | | An error output stream is necessary anyway. Signed-off-by: Hee-Suk Kim <[email protected]>
* sib-ask: fix -p does not take effect when -r turned onHee-Suk Kim2026-05-192-11/+20
| | | | | | | 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: set core.logAllRefUpdates during initHee-Suk Kim2026-05-191-1/+2
| | | | | | | If it is bare, this is probably false, in which case new reflogs are not created for items that are not in logs/. Signed-off-by: Hee-Suk Kim <[email protected]>