yaicli 0.0.16__py3-none-any.whl → 0.0.17__py3-none-any.whl

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.
pyproject.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "yaicli"
3
- version = "0.0.16"
3
+ version = "0.0.17"
4
4
  description = "A simple CLI tool to interact with LLM"
5
5
  authors = [{ name = "belingud", email = "im.victor@qq.com" }]
6
6
  readme = "README.md"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: yaicli
3
- Version: 0.0.16
3
+ Version: 0.0.17
4
4
  Summary: A simple CLI tool to interact with LLM
5
5
  Project-URL: Homepage, https://github.com/belingud/yaicli
6
6
  Project-URL: Repository, https://github.com/belingud/yaicli
@@ -0,0 +1,7 @@
1
+ pyproject.toml,sha256=n7Dd2aKGwVW-et5Vo8T7Ti6taJDglKMcYC7bOkkcgBg,1452
2
+ yaicli.py,sha256=bvr4Mr6otWVgrmHbbPOnYXIINBz8NxfQl2AvbcjQ0Bc,25156
3
+ yaicli-0.0.17.dist-info/METADATA,sha256=iMFag80paztV2vcgO_Xs6cuxw8nLXQ4xeSWavPJ8ny4,29932
4
+ yaicli-0.0.17.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
5
+ yaicli-0.0.17.dist-info/entry_points.txt,sha256=gdduQwAuu_LeDqnDU81Fv3NPmD2tRQ1FffvolIP3S1Q,34
6
+ yaicli-0.0.17.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
7
+ yaicli-0.0.17.dist-info/RECORD,,
yaicli.py CHANGED
@@ -14,7 +14,7 @@ import jmespath
14
14
  import typer
15
15
  from distro import name as distro_name
16
16
  from prompt_toolkit import PromptSession, prompt
17
- from prompt_toolkit.completion import WordCompleter
17
+ # from prompt_toolkit.completion import WordCompleter
18
18
  from prompt_toolkit.history import FileHistory, _StrOrBytesPath
19
19
  from prompt_toolkit.key_binding import KeyBindings, KeyPressEvent
20
20
  from prompt_toolkit.keys import Keys
@@ -105,7 +105,7 @@ class CasePreservingConfigParser(configparser.RawConfigParser):
105
105
 
106
106
 
107
107
  class LimitedFileHistory(FileHistory):
108
- def __init__(self, filename: _StrOrBytesPath, max_entries: int = 500, trim_every: int = 5):
108
+ def __init__(self, filename: _StrOrBytesPath, max_entries: int = 500, trim_every: int = 2):
109
109
  """Limited file history
110
110
  Args:
111
111
  filename (str): path to history file
@@ -171,7 +171,7 @@ class CLI:
171
171
  self.bindings = KeyBindings()
172
172
  # Disable nonatty warning
173
173
  _origin_stderr = None
174
- if not sys.stderr.isatty():
174
+ if not sys.stdin.isatty():
175
175
  _origin_stderr = sys.stderr
176
176
  sys.stderr = open(devnull, "w")
177
177
  self.session = PromptSession(key_bindings=self.bindings)
@@ -195,7 +195,7 @@ class CLI:
195
195
  Path("~/.yaicli_history").expanduser().touch(exist_ok=True)
196
196
  self.session = PromptSession(
197
197
  key_bindings=self.bindings,
198
- completer=WordCompleter(["/clear", "/exit", "/his"]),
198
+ # completer=WordCompleter(["/clear", "/exit", "/his"]),
199
199
  complete_while_typing=True,
200
200
  history=LimitedFileHistory(
201
201
  Path("~/.yaicli_history").expanduser(), max_entries=int(self.config["MAX_HISTORY"])
@@ -1,7 +0,0 @@
1
- pyproject.toml,sha256=95wyxycfXtMy_hraLxEt3JI4Ps4IcDWWn5cyvARlopo,1452
2
- yaicli.py,sha256=ZJTejElstF1BEywXV5Hb5gOONXMbHdj7sHrEJzBqCe8,25153
3
- yaicli-0.0.16.dist-info/METADATA,sha256=xS7MlrbSU7N_CYp1Urbgr3iYu6eP8YeVWCbo2Zi9aAk,29932
4
- yaicli-0.0.16.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
5
- yaicli-0.0.16.dist-info/entry_points.txt,sha256=gdduQwAuu_LeDqnDU81Fv3NPmD2tRQ1FffvolIP3S1Q,34
6
- yaicli-0.0.16.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
7
- yaicli-0.0.16.dist-info/RECORD,,