chat-console 0.1.7.dev1__tar.gz → 0.1.81.dev1__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.
Files changed (28) hide show
  1. {chat_console-0.1.7.dev1 → chat_console-0.1.81.dev1}/PKG-INFO +1 -1
  2. {chat_console-0.1.7.dev1 → chat_console-0.1.81.dev1}/app/ui/chat_interface.py +60 -15
  3. {chat_console-0.1.7.dev1 → chat_console-0.1.81.dev1}/chat_console.egg-info/PKG-INFO +1 -1
  4. {chat_console-0.1.7.dev1 → chat_console-0.1.81.dev1}/setup.py +1 -1
  5. {chat_console-0.1.7.dev1 → chat_console-0.1.81.dev1}/LICENSE +0 -0
  6. {chat_console-0.1.7.dev1 → chat_console-0.1.81.dev1}/README.md +0 -0
  7. {chat_console-0.1.7.dev1 → chat_console-0.1.81.dev1}/app/__init__.py +0 -0
  8. {chat_console-0.1.7.dev1 → chat_console-0.1.81.dev1}/app/api/__init__.py +0 -0
  9. {chat_console-0.1.7.dev1 → chat_console-0.1.81.dev1}/app/api/anthropic.py +0 -0
  10. {chat_console-0.1.7.dev1 → chat_console-0.1.81.dev1}/app/api/base.py +0 -0
  11. {chat_console-0.1.7.dev1 → chat_console-0.1.81.dev1}/app/api/ollama.py +0 -0
  12. {chat_console-0.1.7.dev1 → chat_console-0.1.81.dev1}/app/api/openai.py +0 -0
  13. {chat_console-0.1.7.dev1 → chat_console-0.1.81.dev1}/app/config.py +0 -0
  14. {chat_console-0.1.7.dev1 → chat_console-0.1.81.dev1}/app/database.py +0 -0
  15. {chat_console-0.1.7.dev1 → chat_console-0.1.81.dev1}/app/main.py +0 -0
  16. {chat_console-0.1.7.dev1 → chat_console-0.1.81.dev1}/app/models.py +0 -0
  17. {chat_console-0.1.7.dev1 → chat_console-0.1.81.dev1}/app/ui/__init__.py +0 -0
  18. {chat_console-0.1.7.dev1 → chat_console-0.1.81.dev1}/app/ui/chat_list.py +0 -0
  19. {chat_console-0.1.7.dev1 → chat_console-0.1.81.dev1}/app/ui/model_selector.py +0 -0
  20. {chat_console-0.1.7.dev1 → chat_console-0.1.81.dev1}/app/ui/search.py +0 -0
  21. {chat_console-0.1.7.dev1 → chat_console-0.1.81.dev1}/app/ui/styles.py +0 -0
  22. {chat_console-0.1.7.dev1 → chat_console-0.1.81.dev1}/app/utils.py +0 -0
  23. {chat_console-0.1.7.dev1 → chat_console-0.1.81.dev1}/chat_console.egg-info/SOURCES.txt +0 -0
  24. {chat_console-0.1.7.dev1 → chat_console-0.1.81.dev1}/chat_console.egg-info/dependency_links.txt +0 -0
  25. {chat_console-0.1.7.dev1 → chat_console-0.1.81.dev1}/chat_console.egg-info/entry_points.txt +0 -0
  26. {chat_console-0.1.7.dev1 → chat_console-0.1.81.dev1}/chat_console.egg-info/requires.txt +0 -0
  27. {chat_console-0.1.7.dev1 → chat_console-0.1.81.dev1}/chat_console.egg-info/top_level.txt +0 -0
  28. {chat_console-0.1.7.dev1 → chat_console-0.1.81.dev1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: chat-console
3
- Version: 0.1.7.dev1
3
+ Version: 0.1.81.dev1
4
4
  Summary: A command-line interface for chatting with LLMs, storing chats and (future) rag interactions
5
5
  Home-page: https://github.com/wazacraftrfid/chat-console
6
6
  Author: Johnathan Greenaway
@@ -12,7 +12,9 @@ from textual.widgets import Button, Input, Label, Static
12
12
  from textual.widget import Widget
13
13
  from textual.widgets import RichLog
14
14
  from textual.message import Message
15
+ from textual.binding import Binding
15
16
 
17
+ from .. import __version__
16
18
  from ..models import Message, Conversation
17
19
  from ..api.base import BaseModelClient
18
20
  from ..config import CONFIG
@@ -20,6 +22,56 @@ from ..config import CONFIG
20
22
  # Set up logging
21
23
  logger = logging.getLogger(__name__)
22
24
 
25
+ class SendButton(Button):
26
+ """Custom send button implementation"""
27
+
28
+ DEFAULT_CSS = """
29
+ SendButton {
30
+ width: auto;
31
+ min-width: 20;
32
+ height: 4;
33
+ margin: 0 1;
34
+ content-align: center middle;
35
+ text-style: bold;
36
+ border: none;
37
+ background: $success;
38
+ color: white;
39
+ padding: 0 2;
40
+ text-opacity: 100%;
41
+ }
42
+
43
+ SendButton:hover {
44
+ background: $success-lighten-1;
45
+ text-style: bold reverse;
46
+ }
47
+
48
+ SendButton:focus {
49
+ background: $success-darken-1;
50
+ text-style: bold reverse;
51
+ }
52
+
53
+ SendButton > .label {
54
+ text-opacity: 100%;
55
+ color: white;
56
+ text-style: bold;
57
+ text-align: center;
58
+ width: 100%;
59
+ font-size: 200%;
60
+ }
61
+ """
62
+
63
+ def __init__(self, name: Optional[str] = None):
64
+ super().__init__(
65
+ "⬆ SEND ⬆",
66
+ name=name,
67
+ variant="success"
68
+ )
69
+
70
+ def on_mount(self) -> None:
71
+ """Handle mount event"""
72
+ self.styles.text_opacity = 100
73
+ self.styles.text_style = "bold"
74
+
23
75
  class MessageDisplay(RichLog):
24
76
  """Widget to display a single message"""
25
77
 
@@ -150,20 +202,14 @@ class ChatInterface(Container):
150
202
  border: solid $primary;
151
203
  }
152
204
 
153
- #send-button {
205
+ #version-label {
206
+ width: 100%;
207
+ height: 1;
154
208
  background: $warning;
155
- color: $text;
156
- border: none;
157
- min-width: 8;
158
- height: 3;
159
- margin: 0 1;
160
- content-align: center middle;
209
+ color: black;
210
+ text-align: right;
211
+ padding: 0 1;
161
212
  text-style: bold;
162
- text-opacity: 100%;
163
- }
164
-
165
- #send-button:hover {
166
- background: $warning-lighten-1;
167
213
  }
168
214
 
169
215
  #loading-indicator {
@@ -202,6 +248,7 @@ class ChatInterface(Container):
202
248
  self.messages = conversation.messages
203
249
 
204
250
  def compose(self) -> ComposeResult:
251
+ yield Label(f"Chat CLI v{__version__}", id="version-label")
205
252
  with ScrollableContainer(id="messages-container"):
206
253
  for message in self.messages:
207
254
  yield MessageDisplay(message, highlight_code=CONFIG["highlight_code"])
@@ -212,9 +259,7 @@ class ChatInterface(Container):
212
259
  )
213
260
  with Container(id="controls"):
214
261
  yield InputWithFocus(placeholder="Type your message here...", id="message-input")
215
- yield Button("[on yellow black]SEND[/]", id="send-button", markup=True)
216
-
217
-
262
+ yield SendButton(id="send-button")
218
263
 
219
264
  def on_mount(self) -> None:
220
265
  """Initialize on mount"""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: chat-console
3
- Version: 0.1.7.dev1
3
+ Version: 0.1.81.dev1
4
4
  Summary: A command-line interface for chatting with LLMs, storing chats and (future) rag interactions
5
5
  Home-page: https://github.com/wazacraftrfid/chat-console
6
6
  Author: Johnathan Greenaway
@@ -14,7 +14,7 @@ with open(os.path.join("app", "__init__.py"), "r", encoding="utf-8") as f:
14
14
 
15
15
  setup(
16
16
  name="chat-console",
17
- version="0.1.7.dev1",
17
+ version="0.1.81.dev1",
18
18
  author="Johnathan Greenaway",
19
19
  author_email="john@fimbriata.dev",
20
20
  description="A command-line interface for chatting with LLMs, storing chats and (future) rag interactions",