kiwi-code 0.0.26__tar.gz → 0.0.28__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 (52) hide show
  1. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/PKG-INFO +2 -1
  2. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/pyproject.toml +3 -1
  3. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/src/kiwi_tui/main.py +2 -0
  4. kiwi_code-0.0.28/src/kiwi_tui/random_words.py +80 -0
  5. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/src/kiwi_tui/screens/dashboard.py +658 -118
  6. kiwi_code-0.0.28/src/kiwi_tui/screens/id_picker.py +247 -0
  7. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/src/kiwi_tui/slash_commands.py +1 -0
  8. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/uv.lock +12 -1
  9. kiwi_code-0.0.26/src/kiwi_tui/screens/id_picker.py +0 -75
  10. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/.github/workflows/publish.yml +0 -0
  11. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/.github/workflows/test.yml +0 -0
  12. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/.gitignore +0 -0
  13. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/.python-version +0 -0
  14. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/CLAUDE.md +0 -0
  15. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/Makefile +0 -0
  16. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/README.md +0 -0
  17. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/src/kiwi_cli/__init__.py +0 -0
  18. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/src/kiwi_cli/auth.py +0 -0
  19. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/src/kiwi_cli/cli.py +0 -0
  20. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/src/kiwi_cli/client.py +0 -0
  21. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/src/kiwi_cli/commands.py +0 -0
  22. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/src/kiwi_cli/logger.py +0 -0
  23. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/src/kiwi_cli/models.py +0 -0
  24. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/src/kiwi_cli/runtime_manager.py +0 -0
  25. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/src/kiwi_cli/server.py +0 -0
  26. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/src/kiwi_runtime/__init__.py +0 -0
  27. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/src/kiwi_runtime/__main__.py +0 -0
  28. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/src/kiwi_runtime/main.py +0 -0
  29. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/src/kiwi_runtime/snake_game/.gitignore +0 -0
  30. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/src/kiwi_runtime/snake_game/requirements.txt +0 -0
  31. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/src/kiwi_tui/__init__.py +0 -0
  32. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/src/kiwi_tui/inline_file_picker.py +0 -0
  33. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/src/kiwi_tui/runtime_agent.py +0 -0
  34. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/src/kiwi_tui/screens/__init__.py +0 -0
  35. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/src/kiwi_tui/screens/attach_content.py +0 -0
  36. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/src/kiwi_tui/screens/command_result.py +0 -0
  37. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/src/kiwi_tui/screens/file_browser.py +0 -0
  38. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/src/kiwi_tui/screens/help.py +0 -0
  39. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/src/kiwi_tui/screens/login.py +0 -0
  40. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/src/kiwi_tui/screens/runtime_cleanup.py +0 -0
  41. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/src/kiwi_tui/screens/runtime_logs.py +0 -0
  42. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/src/kiwi_tui/screens/slash_picker.py +0 -0
  43. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/src/kiwi_tui/widgets.py +0 -0
  44. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/test_hello.py +0 -0
  45. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/tests/__init__.py +0 -0
  46. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/tests/conftest.py +0 -0
  47. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/tests/test_cli_help.py +0 -0
  48. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/tests/test_imports.py +0 -0
  49. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/tests/test_reexec_kiwi.py +0 -0
  50. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/tests/test_runtime_log_trimming.py +0 -0
  51. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/tests/test_tokens.py +0 -0
  52. {kiwi_code-0.0.26 → kiwi_code-0.0.28}/tests/test_tui_headless.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kiwi-code
3
- Version: 0.0.26
3
+ Version: 0.0.28
4
4
  Summary: A textual-based terminal user interface application
5
5
  Project-URL: Homepage, https://meetkiwi.ai
6
6
  Project-URL: Repository, https://github.com/jetoslabs/kiwi-code
@@ -25,6 +25,7 @@ Requires-Dist: textual-dev>=1.8.0
25
25
  Requires-Dist: textual>=8.1.1
26
26
  Requires-Dist: typer>=0.24.1
27
27
  Requires-Dist: websockets>=14.1
28
+ Requires-Dist: wonderwords>=2.2.0
28
29
  Description-Content-Type: text/markdown
29
30
 
30
31
  # Kiwi Code
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "kiwi-code"
3
- version = "0.0.26"
3
+ version = "0.0.28"
4
4
  description = "A textual-based terminal user interface application"
5
5
  readme = {file = "README.md", content-type = "text/markdown"}
6
6
  requires-python = ">=3.11,<4.0"
@@ -15,7 +15,9 @@ dependencies = [
15
15
  "httpx>=0.25.0",
16
16
  "psutil>=5.9.0",
17
17
  "setproctitle>=1.3.0",
18
+ "wonderwords>=2.2.0",
18
19
  ]
20
+
19
21
  authors = [
20
22
  { name = "Anurag Jha", email = "anurag@meetkiwi.co" }
21
23
  ]
@@ -281,6 +281,8 @@ class AutobotsTUI(App):
281
281
  # Chat UX: full-width highlight color for user-message rows.
282
282
  # Keep it subtle and theme-aware.
283
283
  variables["user-msg-bg"] = "#333333" if self._is_dark_theme() else "#e8e8e8"
284
+ # Chat UX: subtle highlight for the *active streaming* assistant message.
285
+ variables["assistant-stream-bg"] = "#222222" if self._is_dark_theme() else "#f2f2f2"
284
286
  # Scrollbars: cyan thumb, dark track.
285
287
  variables["scrollbar"] = cyan
286
288
  variables["scrollbar-hover"] = cyan
@@ -0,0 +1,80 @@
1
+ from functools import lru_cache
2
+
3
+
4
+ @lru_cache(maxsize=1)
5
+ def _ww() -> object | None:
6
+ try:
7
+ from wonderwords import RandomWord # type: ignore
8
+
9
+ return RandomWord()
10
+ except Exception:
11
+ return None
12
+
13
+
14
+ def _to_present_participle(verb: str) -> str:
15
+ v = (verb or "").strip()
16
+ if not v:
17
+ return ""
18
+ w = v.lower()
19
+
20
+ # Common irregulars / spelling rules that a simple suffix approach misses.
21
+ irregular = {
22
+ "be": "being",
23
+ "see": "seeing",
24
+ "flee": "fleeing",
25
+ "knee": "kneeing",
26
+ "die": "dying",
27
+ "tie": "tying",
28
+ "lie": "lying",
29
+ }
30
+ if w in irregular:
31
+ return irregular[w].capitalize()
32
+
33
+ # ie -> ying (die -> dying).
34
+ if w.endswith("ie") and len(w) > 2:
35
+ return (w[:-2] + "ying").capitalize()
36
+
37
+ # Drop trailing e (make -> making), but keep ee/ye/oe (see -> seeing).
38
+ if w.endswith("e") and not w.endswith(("ee", "ye", "oe")) and len(w) > 1:
39
+ return (w[:-1] + "ing").capitalize()
40
+
41
+ # Verbs ending in 'ic' often add 'k' (panic -> panicking).
42
+ if w.endswith("ic") and len(w) > 2:
43
+ return (w + "king").capitalize()
44
+
45
+ vowels = set("aeiou")
46
+ # Double final consonant for short CVC words with a/i/o/u vowel (run -> running).
47
+ if (
48
+ 3 <= len(w) <= 4
49
+ and w[-1] not in vowels
50
+ and w[-1] not in "wxy"
51
+ and w[-2] in vowels
52
+ and w[-2] != "e"
53
+ and w[-3] not in vowels
54
+ ):
55
+ return (w + w[-1] + "ing").capitalize()
56
+
57
+ return (w + "ing").capitalize()
58
+
59
+
60
+ def random_verb(*, default: str = "Thinking") -> str:
61
+ """Return a random present-participle verb for display (e.g. "Searching")."""
62
+ rw = _ww()
63
+ if rw is None:
64
+ return default
65
+
66
+ try:
67
+ # wonderwords supports parts_of_speech filtering.
68
+ word = rw.word(include_parts_of_speech=["verbs"]) # type: ignore[attr-defined]
69
+ word = str(word or "").strip()
70
+ if not word:
71
+ return default
72
+ ing = _to_present_participle(word)
73
+ return ing if ing else default
74
+ except Exception:
75
+ return default
76
+
77
+
78
+ # Backward-compat alias (older code used adjectives).
79
+ def random_adjective(*, default: str = "Curious") -> str: # pragma: no cover
80
+ return default