tass 0.1.0__tar.gz → 0.1.1__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tass
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: A terminal assistant that allows you to ask an LLM to run commands.
5
5
  Project-URL: Homepage, https://github.com/cetincan0/tass
6
6
  Author: Can Cetin
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "tass"
3
- version = "0.1.0"
3
+ version = "0.1.1"
4
4
  description = "A terminal assistant that allows you to ask an LLM to run commands."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -42,9 +42,10 @@ class TassApp:
42
42
  )
43
43
 
44
44
  data = response.json()
45
- if "tool_calls" in data["choices"][0]["message"]:
46
- tool_name = data["choices"][0]["message"]["tool_calls"][0]["function"]["name"]
47
- tool_args_str = data["choices"][0]["message"]["tool_calls"][0]["function"]["arguments"]
45
+ message = data["choices"][0]["message"]
46
+ if message.get("tool_calls"):
47
+ tool_name = message["tool_calls"][0]["function"]["name"]
48
+ tool_args_str = message["tool_calls"][0]["function"]["arguments"]
48
49
  self.messages.append(
49
50
  {
50
51
  "role": "assistant",
@@ -73,7 +74,7 @@ class TassApp:
73
74
  return data["choices"][0]["message"]["content"]
74
75
 
75
76
  def read_file(self, path: str, start: int = 1) -> str:
76
- console.print(f" └ Reading file [bold]{path}[/] (start={start})...")
77
+ console.print(f" └ Reading file [bold]{path}[/]...")
77
78
 
78
79
  lines = []
79
80
  with open(path) as f:
@@ -261,7 +261,7 @@ wheels = [
261
261
 
262
262
  [[package]]
263
263
  name = "tass"
264
- version = "0.1.0"
264
+ version = "0.1.1"
265
265
  source = { editable = "." }
266
266
  dependencies = [
267
267
  { name = "requests" },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes