kiwi-code 0.0.31__tar.gz → 0.0.32__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.
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/PKG-INFO +1 -1
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/pyproject.toml +1 -1
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/src/kiwi_tui/screens/dashboard.py +53 -16
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/uv.lock +1 -1
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/.github/workflows/publish.yml +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/.github/workflows/test.yml +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/.gitignore +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/.python-version +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/CLAUDE.md +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/Makefile +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/README.md +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/src/kiwi_cli/__init__.py +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/src/kiwi_cli/auth.py +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/src/kiwi_cli/cli.py +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/src/kiwi_cli/client.py +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/src/kiwi_cli/commands.py +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/src/kiwi_cli/logger.py +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/src/kiwi_cli/models.py +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/src/kiwi_cli/runtime_manager.py +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/src/kiwi_cli/server.py +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/src/kiwi_runtime/__init__.py +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/src/kiwi_runtime/__main__.py +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/src/kiwi_runtime/main.py +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/src/kiwi_runtime/snake_game/.gitignore +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/src/kiwi_runtime/snake_game/requirements.txt +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/src/kiwi_tui/__init__.py +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/src/kiwi_tui/inline_file_picker.py +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/src/kiwi_tui/main.py +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/src/kiwi_tui/random_words.py +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/src/kiwi_tui/runtime_agent.py +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/src/kiwi_tui/screens/__init__.py +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/src/kiwi_tui/screens/attach_content.py +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/src/kiwi_tui/screens/command_result.py +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/src/kiwi_tui/screens/file_browser.py +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/src/kiwi_tui/screens/help.py +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/src/kiwi_tui/screens/id_picker.py +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/src/kiwi_tui/screens/login.py +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/src/kiwi_tui/screens/runtime_cleanup.py +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/src/kiwi_tui/screens/runtime_logs.py +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/src/kiwi_tui/screens/slash_picker.py +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/src/kiwi_tui/slash_commands.py +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/src/kiwi_tui/status_words.py +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/src/kiwi_tui/widgets.py +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/test_hello.py +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/tests/__init__.py +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/tests/conftest.py +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/tests/test_cli_help.py +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/tests/test_imports.py +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/tests/test_reexec_kiwi.py +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/tests/test_runtime_log_trimming.py +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/tests/test_tokens.py +0 -0
- {kiwi_code-0.0.31 → kiwi_code-0.0.32}/tests/test_tui_headless.py +0 -0
|
@@ -721,6 +721,36 @@ class DashboardScreen(Screen):
|
|
|
721
721
|
def show(body: str, *, is_error: bool = False, title: str | None = None) -> None:
|
|
722
722
|
self._show_command_result(title or command, body, is_error=is_error)
|
|
723
723
|
|
|
724
|
+
def toast(
|
|
725
|
+
message: str,
|
|
726
|
+
*,
|
|
727
|
+
severity: "SeverityLevel" = "information",
|
|
728
|
+
title: str = "",
|
|
729
|
+
timeout: float | None = 2.5,
|
|
730
|
+
) -> None:
|
|
731
|
+
"""Show a non-blocking toast notification.
|
|
732
|
+
|
|
733
|
+
Preferred for slash commands where the user doesn't need a full modal
|
|
734
|
+
(e.g. /new, /use, /continue).
|
|
735
|
+
"""
|
|
736
|
+
try:
|
|
737
|
+
# Screen inherits Widget, which provides notify() (delegates to App.notify).
|
|
738
|
+
self.notify(
|
|
739
|
+
message,
|
|
740
|
+
title=title,
|
|
741
|
+
severity=severity,
|
|
742
|
+
timeout=timeout,
|
|
743
|
+
markup=False,
|
|
744
|
+
)
|
|
745
|
+
except Exception:
|
|
746
|
+
# If toast notifications fail for any reason, fall back to the modal so
|
|
747
|
+
# the user still gets feedback.
|
|
748
|
+
self._show_command_result(
|
|
749
|
+
title or command, message, is_error=severity == "error"
|
|
750
|
+
)
|
|
751
|
+
|
|
752
|
+
|
|
753
|
+
|
|
724
754
|
# --- TUI-specific commands ---
|
|
725
755
|
|
|
726
756
|
if cmd == "/upload":
|
|
@@ -871,11 +901,11 @@ class DashboardScreen(Screen):
|
|
|
871
901
|
self.current_run_kind = None
|
|
872
902
|
self._update_run_status_bar()
|
|
873
903
|
self._clear_chat_messages()
|
|
874
|
-
|
|
904
|
+
toast("Started a new conversation.", title="/new")
|
|
875
905
|
return
|
|
876
906
|
if cmd == "/use":
|
|
877
907
|
if not args:
|
|
878
|
-
|
|
908
|
+
toast("Usage: /use <action_id>", title="/use", severity="warning")
|
|
879
909
|
return
|
|
880
910
|
action_id = args[0]
|
|
881
911
|
from kiwi_cli.commands import actions_get
|
|
@@ -885,19 +915,19 @@ class DashboardScreen(Screen):
|
|
|
885
915
|
if lines is None:
|
|
886
916
|
return
|
|
887
917
|
if lines and lines[0].startswith("Error"):
|
|
888
|
-
|
|
918
|
+
toast(f"Action not found: {action_id}", title="/use", severity="error")
|
|
889
919
|
return
|
|
890
920
|
self.current_action_id = action_id
|
|
891
921
|
self.current_run_id = None
|
|
892
922
|
self.current_run_kind = None
|
|
893
923
|
self._update_run_status_bar()
|
|
894
924
|
self._clear_chat_messages()
|
|
895
|
-
|
|
925
|
+
toast(f"Switched to action {action_id}.", title="/use")
|
|
896
926
|
return
|
|
897
927
|
|
|
898
928
|
if cmd == "/continue":
|
|
899
929
|
if not args:
|
|
900
|
-
|
|
930
|
+
toast("Usage: /continue <run_id>", title="/continue", severity="warning")
|
|
901
931
|
return
|
|
902
932
|
run_id = args[0]
|
|
903
933
|
from kiwi_cli.commands import runs_get
|
|
@@ -907,24 +937,26 @@ class DashboardScreen(Screen):
|
|
|
907
937
|
if lines is None:
|
|
908
938
|
return
|
|
909
939
|
if lines and lines[0].startswith("Error"):
|
|
910
|
-
|
|
940
|
+
toast(f"Run not found: {run_id}", title="/continue", severity="error")
|
|
911
941
|
return
|
|
912
942
|
self.current_run_id = run_id
|
|
913
943
|
self.current_run_kind = "action"
|
|
914
944
|
self._update_run_status_bar()
|
|
915
|
-
|
|
945
|
+
toast(f"Continuing run {run_id}...", title="/continue")
|
|
916
946
|
await self._load_conversation_history_async(run_id)
|
|
917
947
|
return
|
|
918
948
|
|
|
919
949
|
if cmd == "/name":
|
|
920
950
|
new_name = " ".join(args).strip()
|
|
921
951
|
if not new_name:
|
|
922
|
-
|
|
952
|
+
toast("Usage: /name <new name>", title="/name", severity="warning")
|
|
923
953
|
return
|
|
924
954
|
if not self.current_run_id:
|
|
925
|
-
|
|
926
|
-
"
|
|
927
|
-
|
|
955
|
+
toast(
|
|
956
|
+
"No run id yet. Send a message to start a run, or use /continue <run_id> (or pick one from /runs list).",
|
|
957
|
+
title="/name",
|
|
958
|
+
severity="error",
|
|
959
|
+
timeout=4,
|
|
928
960
|
)
|
|
929
961
|
return
|
|
930
962
|
|
|
@@ -990,10 +1022,15 @@ class DashboardScreen(Screen):
|
|
|
990
1022
|
|
|
991
1023
|
if status_code != 200:
|
|
992
1024
|
details = err or ""
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
1025
|
+
# Keep this as a toast (non-blocking). Truncate details to avoid huge toasts.
|
|
1026
|
+
details_short = (details or "").strip().replace("\n", " ")
|
|
1027
|
+
if len(details_short) > 160:
|
|
1028
|
+
details_short = details_short[:157] + "..."
|
|
1029
|
+
msg = f"Failed to rename run {run_id} (HTTP {status_code})."
|
|
1030
|
+
if details_short:
|
|
1031
|
+
msg += f" {details_short}"
|
|
1032
|
+
toast(msg, title="/name", severity="error", timeout=5)
|
|
1033
|
+
|
|
997
1034
|
return
|
|
998
1035
|
|
|
999
1036
|
# Best-effort: update local cached run name (used by the quit-time cleanup prompt).
|
|
@@ -1009,7 +1046,7 @@ class DashboardScreen(Screen):
|
|
|
1009
1046
|
except Exception:
|
|
1010
1047
|
pass
|
|
1011
1048
|
|
|
1012
|
-
|
|
1049
|
+
toast(f"Renamed run {run_id} to: {new_name}", title="/name", timeout=4)
|
|
1013
1050
|
return
|
|
1014
1051
|
|
|
1015
1052
|
if cmd == "/status":
|
|
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
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|