deepy-cli 0.1.3__tar.gz → 0.1.4__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 (68) hide show
  1. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/PKG-INFO +2 -2
  2. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/README.md +1 -1
  3. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/pyproject.toml +1 -1
  4. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/__init__.py +1 -1
  5. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/ui/terminal.py +40 -6
  6. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/__main__.py +0 -0
  7. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/cli.py +0 -0
  8. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/config/__init__.py +0 -0
  9. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/config/settings.py +0 -0
  10. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/data/__init__.py +0 -0
  11. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/data/tools/AskUserQuestion.md +0 -0
  12. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/data/tools/WebFetch.md +0 -0
  13. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/data/tools/WebSearch.md +0 -0
  14. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/data/tools/__init__.py +0 -0
  15. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/data/tools/bash.md +0 -0
  16. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/data/tools/edit.md +0 -0
  17. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/data/tools/modify.md +0 -0
  18. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/data/tools/read.md +0 -0
  19. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/data/tools/write.md +0 -0
  20. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/errors.py +0 -0
  21. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/llm/__init__.py +0 -0
  22. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/llm/agent.py +0 -0
  23. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/llm/context.py +0 -0
  24. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/llm/events.py +0 -0
  25. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/llm/model_capabilities.py +0 -0
  26. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/llm/provider.py +0 -0
  27. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/llm/replay.py +0 -0
  28. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/llm/runner.py +0 -0
  29. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/llm/thinking.py +0 -0
  30. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/prompts/__init__.py +0 -0
  31. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/prompts/compact.py +0 -0
  32. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/prompts/rules.py +0 -0
  33. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/prompts/runtime_context.py +0 -0
  34. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/prompts/system.py +0 -0
  35. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/prompts/tool_docs.py +0 -0
  36. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/sessions/__init__.py +0 -0
  37. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/sessions/jsonl.py +0 -0
  38. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/sessions/manager.py +0 -0
  39. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/skills.py +0 -0
  40. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/status.py +0 -0
  41. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/tools/__init__.py +0 -0
  42. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/tools/agents.py +0 -0
  43. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/tools/builtin.py +0 -0
  44. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/tools/file_state.py +0 -0
  45. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/tools/result.py +0 -0
  46. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/tools/shell_utils.py +0 -0
  47. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/ui/__init__.py +0 -0
  48. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/ui/app.py +0 -0
  49. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/ui/ask_user_question.py +0 -0
  50. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/ui/exit_summary.py +0 -0
  51. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/ui/loading_text.py +0 -0
  52. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/ui/markdown.py +0 -0
  53. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/ui/message_view.py +0 -0
  54. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/ui/prompt_buffer.py +0 -0
  55. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/ui/prompt_input.py +0 -0
  56. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/ui/session_list.py +0 -0
  57. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/ui/session_picker.py +0 -0
  58. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/ui/slash_commands.py +0 -0
  59. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/ui/styles.py +0 -0
  60. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/ui/thinking_state.py +0 -0
  61. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/ui/welcome.py +0 -0
  62. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/update_check.py +0 -0
  63. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/usage.py +0 -0
  64. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/utils/__init__.py +0 -0
  65. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/utils/debug_logger.py +0 -0
  66. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/utils/error_logger.py +0 -0
  67. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/utils/json.py +0 -0
  68. {deepy_cli-0.1.3 → deepy_cli-0.1.4}/src/deepy/utils/notify.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: deepy-cli
3
- Version: 0.1.3
3
+ Version: 0.1.4
4
4
  Summary: Deepy - Vibe coding for DeepSeek models in your terminal
5
5
  Keywords: deepseek,coding-agent,terminal,cli,agents
6
6
  Author: kirineko
@@ -208,6 +208,6 @@ assets live outside the package directory and are not included in the wheel.
208
208
 
209
209
  ## Release Status
210
210
 
211
- Deepy is preparing its first public `0.1.3` release. The current release path is
211
+ Deepy is preparing its first public `0.1.4` release. The current release path is
212
212
  GitHub + PyPI. Standalone binaries and npm wrappers can be added later, but the
213
213
  primary distribution is the Python CLI.
@@ -180,6 +180,6 @@ assets live outside the package directory and are not included in the wheel.
180
180
 
181
181
  ## Release Status
182
182
 
183
- Deepy is preparing its first public `0.1.3` release. The current release path is
183
+ Deepy is preparing its first public `0.1.4` release. The current release path is
184
184
  GitHub + PyPI. Standalone binaries and npm wrappers can be added later, but the
185
185
  primary distribution is the Python CLI.
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "deepy-cli"
3
- version = "0.1.3"
3
+ version = "0.1.4"
4
4
  description = "Deepy - Vibe coding for DeepSeek models in your terminal"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -1,6 +1,6 @@
1
1
  from __future__ import annotations
2
2
 
3
- __version__ = "0.1.3"
3
+ __version__ = "0.1.4"
4
4
 
5
5
 
6
6
  def main() -> None:
@@ -4,16 +4,25 @@ import asyncio
4
4
  import contextlib
5
5
  import os
6
6
  import select
7
- import sys
8
- import termios
9
7
  import threading
10
8
  import time
11
- import tty
12
9
  from collections.abc import Awaitable, Callable
13
10
  from dataclasses import dataclass
14
11
  from pathlib import Path
15
12
  from typing import Any
16
13
 
14
+ try:
15
+ import termios
16
+ import tty
17
+ except ImportError: # pragma: no cover - exercised on Windows.
18
+ termios = None # type: ignore[assignment]
19
+ tty = None # type: ignore[assignment]
20
+
21
+ try:
22
+ import msvcrt
23
+ except ImportError: # pragma: no cover - exercised on non-Windows platforms.
24
+ msvcrt = None # type: ignore[assignment]
25
+
17
26
  from rich.console import Console
18
27
  from rich.prompt import Prompt
19
28
  from rich.text import Text
@@ -273,13 +282,17 @@ def _run_once_with_status(
273
282
 
274
283
  @contextlib.contextmanager
275
284
  def _esc_interrupt_watcher(interrupt_requested: threading.Event):
276
- if not sys.stdin.isatty() and not Path("/dev/tty").exists():
285
+ if termios is not None and tty is not None and Path("/dev/tty").exists():
286
+ target = _watch_posix_esc_keypress
287
+ elif msvcrt is not None:
288
+ target = _watch_windows_esc_keypress
289
+ else:
277
290
  yield
278
291
  return
279
292
 
280
293
  stop_event = threading.Event()
281
294
  thread = threading.Thread(
282
- target=_watch_esc_keypress,
295
+ target=target,
283
296
  args=(interrupt_requested, stop_event),
284
297
  daemon=True,
285
298
  )
@@ -291,13 +304,15 @@ def _esc_interrupt_watcher(interrupt_requested: threading.Event):
291
304
  thread.join(timeout=0.2)
292
305
 
293
306
 
294
- def _watch_esc_keypress(
307
+ def _watch_posix_esc_keypress(
295
308
  interrupt_requested: threading.Event,
296
309
  stop_event: threading.Event,
297
310
  ) -> None:
298
311
  fd: int | None = None
299
312
  old_attrs: list[Any] | None = None
300
313
  try:
314
+ if termios is None or tty is None:
315
+ return
301
316
  fd = os.open("/dev/tty", os.O_RDONLY | os.O_NONBLOCK)
302
317
  old_attrs = termios.tcgetattr(fd)
303
318
  tty.setcbreak(fd)
@@ -323,6 +338,25 @@ def _watch_esc_keypress(
323
338
  os.close(fd)
324
339
 
325
340
 
341
+ def _watch_windows_esc_keypress(
342
+ interrupt_requested: threading.Event,
343
+ stop_event: threading.Event,
344
+ ) -> None:
345
+ if msvcrt is None:
346
+ return
347
+ while not stop_event.is_set() and not interrupt_requested.is_set():
348
+ try:
349
+ if not msvcrt.kbhit():
350
+ time.sleep(0.05)
351
+ continue
352
+ key = msvcrt.getwch()
353
+ except Exception:
354
+ return
355
+ if key == "\x1b":
356
+ interrupt_requested.set()
357
+ return
358
+
359
+
326
360
  class TerminalStreamRenderer:
327
361
  def __init__(
328
362
  self,
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes