Commit Graph

110 Commits (a17f349daa0609402c51205929b9f2b32f6fb1bb)

Author SHA1 Message Date
sigoden e86ad7dc16
feat: add `.info role` and `.info session` (#183) 11 months ago
sigoden 2168610dbd chore: spellcheck 11 months ago
sigoden 23e9fb5bbf
feat: deprecate .clear command (#180) 11 months ago
sigoden ba3cc4f15d
feat: deprecate history file (#179) 11 months ago
sigoden 2f9121e515
fix: bugs between sesison/role (#178) 11 months ago
sigoden b3e6879438
feat: deprecate prompt, remove `--prompt` and `.prompt` (#176) 11 months ago
sigoden 44ea384ee5 chore: remove unnecessary clippy macros 11 months ago
sigoden b276dfedd2
feat: support textwrap (#171)
* feat: support textwrap

* improve cmd_render_stream

* done cmd_render_stream

* add `-w` alias to `--wrap`

* done repl_render_stream

* add `config.wrap_code`

* remove cached config.wrap_width

* fix unxpected duplicate lines on kitty

* refactor markdown render

* improve render

* fix test
11 months ago
sigoden 871adab22a chore: improve code quanity 11 months ago
sigoden bc44026ff8
feat: enhance session/conversation (#162)
* feat: enhance session/conversation

* updates

* updates

* cut version v0.9.0-rc2

* add .session name completion
11 months ago
sigoden 1575d44172
fix: .copy don't works on some linux distro (#161) 11 months ago
sigoden aa43612d91
feat: change config.vi_keybindings to config.keybindings (#158) 11 months ago
sigoden d43425e22b
chore: change left-prompt for conversation (#157) 11 months ago
sigoden 2fad63be6a
fix: parse command fails if command following newline (#153) 11 months ago
sigoden ca0f6343f2
feat: add .edit command for multi-line editing (#151) 11 months ago
sigoden b3f8f27018 refactor: improve code quanity 11 months ago
Leo Bergnéhr c3f9ef6c39
feat: add .read command (#145) 11 months ago
sigoden 66fd547c0f refactor: improve code quanity
remove tokio::runtime::Runtime from client
11 months ago
sigoden 7d8564cafb
feat: support multi bots and custom url (#150) 11 months ago
sigoden f4160ff85b
feat: suppport vi keybindings (#148) 11 months ago
sigoden b5e1460151
feat: use backslash at end of line for multiline text (#147)
BREAKING CHANGE: use backslash at end of line for multiline text

```
〉.set dry_run true

〉abc \
def \
ijk

>>> The following message consumes 12 tokens.
abc 
def 
ijk
```

Deprecate old {}/() multi-line editing
11 months ago
sigoden 90bdc1b7db chore: update deps 11 months ago
Anthony Rubick 97fc7de675
fix: minor code cleanup and pedantic lints (#134) 1 year ago
sigoden 00ce157571
feat: add `.copy` command (#119) 1 year ago
shane s cf03952c7b
feat: add `config.auto_copy` (#102)
* added config option to copy all ChatGPT output to clipboard

* formatted with

* updates

---------

Co-authored-by: sigoden <sigoden@gmail.com>
1 year ago
sigoden 439d231e42 chore: trivial updates 1 year ago
sigoden 065a32decb
feat: support backeted paste (#117) 1 year ago
sigoden 19ce62ab76
feat: check token usage in dry_run mode (#82) 2 years ago
sigoden 1ef97b2f32
feat: support multiple models (#71) 2 years ago
sigoden 9c04455e36
feat: support role args (#69)
* feat: support role args

We can use role args to pass some additional arguments to the prompt.

```
- name: convert:json:yaml
  prompt: convert __ARG1__ below to __ARG2__
```

`:json:yaml` is `role args`. It has two args:

- arg1 `json`, it will replace __ARG1__ in prompt
- arg2 `yaml`, it will replace __ARG2__ in prompt

```
〉.role convert:json:yaml
name: convert:json:yaml
prompt: convert json below to yaml
temperature: null

〉.role convert:yaml:json
name: convert:yaml:json
prompt: convert yaml below to json
temperature: null
```

different role args,  will generate different prompts.

* small updates
2 years ago
sigoden 0ed0ad1fd2 chore: optimize readline multiline 2 years ago
sigoden 4aab872ee1
feat: add support for NO_COLOR (#67) 2 years ago
sigoden cfb6ce6958
feat: support light theme (#65)
There are two ways to enable the light theme:
- add `light_theme: true` to config.yaml
- use `AICHAT_LIGHT_THEME=true` env var
2 years ago
sigoden d48cd64162
feat: provide `--prompt` for adding a prompt from cli (#62) 2 years ago
sigoden cc626e73df chore: update `.help` output text 2 years ago
sigoden 1dc16e6709
feat: type `{` `[` `(` to enter multi-line editing mode (#58)
Abandon `.editor` command, it's too complicated.
2 years ago
sigoden 865fb49af9 chore: improve code quality, omit head 2 newlines in handler but in not client 2 years ago
sigoden 899c4af9ea fix: forbid .clear role in middle of conversation 2 years ago
sigoden ff00426c2c chore: improve code quality, split rep/prompt.rs from repl/init.rs 2 years ago
sigoden 05d20f207f
feat: add remain tokens indicator and max tokens guard (#50) 2 years ago
sigoden c7eb261abc
fix: abort by ctrlc unexpectedly prints error message (#49) 2 years ago
sigoden a62e461e38
feat: support conversation (#48) 2 years ago
sigoden a7f2da156c
feat: add role info to readline indicator (#47)
```
coder〉
```
2 years ago
sigoden e78b5f7c58 refactor: imports order and group 2 years ago
sigoden 1ec451da89
refactor: replace Arc<Refcell<Config>> with Arc<Mutex<Config>> (#46) 2 years ago
sigoden 00ba8b5108 refactor: extra spaces are allowed around repl command 2 years ago
sigoden 9d32837669
chore: optimize newline again (#43)
* chore: optimize newline again

command mode: should no extra newline
chat mode: should have one newline

* fix windows newline

* fix macos newline
2 years ago
sigoden 2539e24fe9
chore: improve code by getting prompt from config (#39) 2 years ago
sigoden 2a7a6f5f27 chore: no longer ignore any error 2 years ago
sigoden 4e729db237 chore: optimize output newline 2 years ago
sigoden f694a59dcc
refactor: replace dump with print_now! (#35) 2 years ago
sigoden b7cb6f89f1
fix: repl set save true not work if not rerun(#34) 2 years ago
sigoden 360264121c
feat: command mode supports stream out (#31)
* feat: command mode supports stream out

* update cli
2 years ago
sigoden c7fcdb1744
refactor: adjust repl (#30)
- abandon .copy
- rename .multiple => .editor
- if command successed, do not output `Done`
- if command failed, output `Error: <error message>`
2 years ago
sigoden 11dc4d104b
refactor: optimize ctrl+c/ctrl+d abort handling (#27) 2 years ago
sigoden 1640456049
refactor: use syntect for highlight, abandon mdcat (#26)
* refactor: use syntect for highlight, abandon mdcat

* split src/render.rs to sub modules. embed a default theme

* simulate typing effect.

* fix format
2 years ago
sigoden c12ae02751 chore: improve code by renameing some function 2 years ago
sigoden cfb46ca0de
feat: add `--no-highlight` option (#24) 2 years ago
sigoden c5a2f4603c chore: optimize code 2 years ago
sigoden 2152667fc6
refactor: split src/repl.rs to submodules (#22) 2 years ago