chat-console 0.1.6.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.6.dev1 → chat_console-0.1.81.dev1}/PKG-INFO +1 -1
  2. {chat_console-0.1.6.dev1 → chat_console-0.1.81.dev1}/app/main.py +7 -3
  3. {chat_console-0.1.6.dev1 → chat_console-0.1.81.dev1}/app/ui/chat_interface.py +64 -14
  4. {chat_console-0.1.6.dev1 → chat_console-0.1.81.dev1}/chat_console.egg-info/PKG-INFO +1 -1
  5. {chat_console-0.1.6.dev1 → chat_console-0.1.81.dev1}/setup.py +1 -1
  6. {chat_console-0.1.6.dev1 → chat_console-0.1.81.dev1}/LICENSE +0 -0
  7. {chat_console-0.1.6.dev1 → chat_console-0.1.81.dev1}/README.md +0 -0
  8. {chat_console-0.1.6.dev1 → chat_console-0.1.81.dev1}/app/__init__.py +0 -0
  9. {chat_console-0.1.6.dev1 → chat_console-0.1.81.dev1}/app/api/__init__.py +0 -0
  10. {chat_console-0.1.6.dev1 → chat_console-0.1.81.dev1}/app/api/anthropic.py +0 -0
  11. {chat_console-0.1.6.dev1 → chat_console-0.1.81.dev1}/app/api/base.py +0 -0
  12. {chat_console-0.1.6.dev1 → chat_console-0.1.81.dev1}/app/api/ollama.py +0 -0
  13. {chat_console-0.1.6.dev1 → chat_console-0.1.81.dev1}/app/api/openai.py +0 -0
  14. {chat_console-0.1.6.dev1 → chat_console-0.1.81.dev1}/app/config.py +0 -0
  15. {chat_console-0.1.6.dev1 → chat_console-0.1.81.dev1}/app/database.py +0 -0
  16. {chat_console-0.1.6.dev1 → chat_console-0.1.81.dev1}/app/models.py +0 -0
  17. {chat_console-0.1.6.dev1 → chat_console-0.1.81.dev1}/app/ui/__init__.py +0 -0
  18. {chat_console-0.1.6.dev1 → chat_console-0.1.81.dev1}/app/ui/chat_list.py +0 -0
  19. {chat_console-0.1.6.dev1 → chat_console-0.1.81.dev1}/app/ui/model_selector.py +0 -0
  20. {chat_console-0.1.6.dev1 → chat_console-0.1.81.dev1}/app/ui/search.py +0 -0
  21. {chat_console-0.1.6.dev1 → chat_console-0.1.81.dev1}/app/ui/styles.py +0 -0
  22. {chat_console-0.1.6.dev1 → chat_console-0.1.81.dev1}/app/utils.py +0 -0
  23. {chat_console-0.1.6.dev1 → chat_console-0.1.81.dev1}/chat_console.egg-info/SOURCES.txt +0 -0
  24. {chat_console-0.1.6.dev1 → chat_console-0.1.81.dev1}/chat_console.egg-info/dependency_links.txt +0 -0
  25. {chat_console-0.1.6.dev1 → chat_console-0.1.81.dev1}/chat_console.egg-info/entry_points.txt +0 -0
  26. {chat_console-0.1.6.dev1 → chat_console-0.1.81.dev1}/chat_console.egg-info/requires.txt +0 -0
  27. {chat_console-0.1.6.dev1 → chat_console-0.1.81.dev1}/chat_console.egg-info/top_level.txt +0 -0
  28. {chat_console-0.1.6.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.6.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
@@ -262,12 +262,14 @@ class SimpleChatApp(App):
262
262
  width: auto;
263
263
  min-width: 8;
264
264
  height: 2;
265
- color: $text;
265
+ color: #FFFFFF !important;
266
266
  background: $primary;
267
267
  border: solid $primary;
268
268
  content-align: center middle;
269
+ text-style: bold; /* Add this line */
269
270
  }
270
271
 
272
+
271
273
  #button-row {
272
274
  width: 100%;
273
275
  height: auto;
@@ -278,21 +280,23 @@ class SimpleChatApp(App):
278
280
  width: auto;
279
281
  min-width: 8;
280
282
  height: 2;
281
- color: $text;
283
+ color: #FFFFFF !important; /* Force white text */
282
284
  background: $success;
283
285
  border: solid $success-lighten-1;
284
286
  content-align: center middle;
287
+ text-style: bold;
285
288
  }
286
289
 
287
290
  #view-history-button, #settings-button {
288
291
  width: auto;
289
292
  min-width: 8;
290
293
  height: 2;
291
- color: $text;
294
+ color: #FFFFFF !important; /* Force white text */
292
295
  background: $primary-darken-1;
293
296
  border: solid $primary;
294
297
  margin-right: 1;
295
298
  content-align: center middle;
299
+ text-style: bold;
296
300
  }
297
301
  """
298
302
 
@@ -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,10 +202,14 @@ class ChatInterface(Container):
150
202
  border: solid $primary;
151
203
  }
152
204
 
153
- #send-button {
154
- width: auto;
155
- min-width: 8;
156
- height: 2;
205
+ #version-label {
206
+ width: 100%;
207
+ height: 1;
208
+ background: $warning;
209
+ color: black;
210
+ text-align: right;
211
+ padding: 0 1;
212
+ text-style: bold;
157
213
  }
158
214
 
159
215
  #loading-indicator {
@@ -192,23 +248,18 @@ class ChatInterface(Container):
192
248
  self.messages = conversation.messages
193
249
 
194
250
  def compose(self) -> ComposeResult:
195
- """Compose the chat interface"""
196
- # Messages area
251
+ yield Label(f"Chat CLI v{__version__}", id="version-label")
197
252
  with ScrollableContainer(id="messages-container"):
198
253
  for message in self.messages:
199
254
  yield MessageDisplay(message, highlight_code=CONFIG["highlight_code"])
200
-
201
- # Input area with loading indicator and controls
202
255
  with Container(id="input-area"):
203
256
  yield Container(
204
257
  Label("Generating response...", id="loading-text"),
205
258
  id="loading-indicator"
206
259
  )
207
- yield Container(
208
- InputWithFocus(placeholder="Type your message here...", id="message-input"),
209
- Button("Send", id="send-button", variant="primary"),
210
- id="controls"
211
- )
260
+ with Container(id="controls"):
261
+ yield InputWithFocus(placeholder="Type your message here...", id="message-input")
262
+ yield SendButton(id="send-button")
212
263
 
213
264
  def on_mount(self) -> None:
214
265
  """Initialize on mount"""
@@ -229,7 +280,6 @@ class ChatInterface(Container):
229
280
  async def on_button_pressed(self, event: Button.Pressed) -> None:
230
281
  """Handle button presses"""
231
282
  button_id = event.button.id
232
-
233
283
  if button_id == "send-button":
234
284
  await self.send_message()
235
285
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: chat-console
3
- Version: 0.1.6.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.6.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",