codebind 0.6.20__tar.gz → 0.6.21__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 (35) hide show
  1. {codebind-0.6.20 → codebind-0.6.21}/PKG-INFO +3 -2
  2. {codebind-0.6.20 → codebind-0.6.21}/README.md +2 -1
  3. {codebind-0.6.20 → codebind-0.6.21}/pyproject.toml +1 -1
  4. {codebind-0.6.20 → codebind-0.6.21}/pyproject.toml.orig +1 -1
  5. {codebind-0.6.20 → codebind-0.6.21}/src/codebind/terminal.py +0 -34
  6. {codebind-0.6.20 → codebind-0.6.21}/LICENSE +0 -0
  7. {codebind-0.6.20 → codebind-0.6.21}/data/share/jupyter/labextensions/codebind-jupyterlab/install.json +0 -0
  8. {codebind-0.6.20 → codebind-0.6.21}/data/share/jupyter/labextensions/codebind-jupyterlab/package.json +0 -0
  9. {codebind-0.6.20 → codebind-0.6.21}/data/share/jupyter/labextensions/codebind-jupyterlab/static/590.0b7494e278aa27b9.js +0 -0
  10. {codebind-0.6.20 → codebind-0.6.21}/data/share/jupyter/labextensions/codebind-jupyterlab/static/remoteEntry.8f763ad3faac0f5a.js +0 -0
  11. {codebind-0.6.20 → codebind-0.6.21}/data/share/jupyter/labextensions/codebind-jupyterlab/static/style.js +0 -0
  12. {codebind-0.6.20 → codebind-0.6.21}/data/share/jupyter/labextensions/codebind-jupyterlab/static/third-party-licenses.json +0 -0
  13. {codebind-0.6.20 → codebind-0.6.21}/jupyterlab/.yarnrc.yml +0 -0
  14. {codebind-0.6.20 → codebind-0.6.21}/jupyterlab/install.json +0 -0
  15. {codebind-0.6.20 → codebind-0.6.21}/jupyterlab/package.json +0 -0
  16. {codebind-0.6.20 → codebind-0.6.21}/jupyterlab/src/index.ts +0 -0
  17. {codebind-0.6.20 → codebind-0.6.21}/jupyterlab/tsconfig.json +0 -0
  18. {codebind-0.6.20 → codebind-0.6.21}/jupyterlab/yarn.lock +0 -0
  19. {codebind-0.6.20 → codebind-0.6.21}/src/codebind/__init__.py +0 -0
  20. {codebind-0.6.20 → codebind-0.6.21}/src/codebind/async_runtime.py +0 -0
  21. {codebind-0.6.20 → codebind-0.6.21}/src/codebind/cli.py +0 -0
  22. {codebind-0.6.20 → codebind-0.6.21}/src/codebind/configuration.py +0 -0
  23. {codebind-0.6.20 → codebind-0.6.21}/src/codebind/context.md +0 -0
  24. {codebind-0.6.20 → codebind-0.6.21}/src/codebind/context.py +0 -0
  25. {codebind-0.6.20 → codebind-0.6.21}/src/codebind/conversation.py +0 -0
  26. {codebind-0.6.20 → codebind-0.6.21}/src/codebind/display.py +0 -0
  27. {codebind-0.6.20 → codebind-0.6.21}/src/codebind/execution.py +0 -0
  28. {codebind-0.6.20 → codebind-0.6.21}/src/codebind/extension.py +0 -0
  29. {codebind-0.6.20 → codebind-0.6.21}/src/codebind/images.py +0 -0
  30. {codebind-0.6.20 → codebind-0.6.21}/src/codebind/instructions.md +0 -0
  31. {codebind-0.6.20 → codebind-0.6.21}/src/codebind/interrupts.py +0 -0
  32. {codebind-0.6.20 → codebind-0.6.21}/src/codebind/jupyter.py +0 -0
  33. {codebind-0.6.20 → codebind-0.6.21}/src/codebind/model_text.py +0 -0
  34. {codebind-0.6.20 → codebind-0.6.21}/src/codebind/py.typed +0 -0
  35. {codebind-0.6.20 → codebind-0.6.21}/src/codebind/session.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codebind
3
- Version: 0.6.20
3
+ Version: 0.6.21
4
4
  Summary: A frontend-neutral model loop for persistent IPython sessions.
5
5
  Keywords: ai,ipython,llm,repl,agents
6
6
  Author: Giovanni Gravili
@@ -80,7 +80,8 @@ Inspect this project and tell me what to implement first.
80
80
  Codebind keeps its terminal prompt and internal bookkeeping usable when a tool cell leaves an asyncio loop active on the terminal thread. This also supports sync clients that manage their own loop across tool cells, without changing IPython’s normal top-level `await` behavior.
81
81
 
82
82
  Terminal conversations remain live for the current IPython process. Previous terminal inputs and outputs, including Python cells you ran yourself, enter the model's context when you ask a question. Durable automatic resumption belongs to notebooks, where the notebook file provides an unambiguous conversation identity.
83
- While a question runs, its cell shows `In [*]` and its tools show `In [N]`, as a notebook does. `Ctrl+C` during a question stops the whole turn: it prints a plain `KeyboardInterrupt` and returns to the prompt, whether the interrupt lands in the model stream or in a running tool cell. Model-executed cells appear with IPython's native input counter, syntax highlighting, output prompts, streams, and tracebacks. Assistant Markdown appears before the following tool cell, and tool output appears as it is written. To keep terminal scrollback usable, Codebind previews at most three gray output lines, shortening each line after 80 characters with `...`. Further lines appear as `… N more output lines.` Full output remains in IPython history, while model-facing text is bounded and displayed images stay available as image blocks; `%output 8` opens the full text of cell 8 in IPython's pager. User-entered Python cells keep IPython's normal display behavior. Assistant Markdown is rendered through IPython's terminal MIME renderer. A terminal is a stream rather than a notebook document, so these displays are not editable notebook cells.
83
+
84
+ `Ctrl+C` during a question stops the whole turn: it prints a plain `KeyboardInterrupt` and returns to the prompt, whether the interrupt lands in the model stream or in a running tool cell. Model-executed cells appear with IPython's native input counter, syntax highlighting, output prompts, streams, and tracebacks. Assistant Markdown appears before the following tool cell, and tool output appears as it is written. To keep terminal scrollback usable, Codebind previews at most three gray output lines, shortening each line after 80 characters with `...`. Further lines appear as `… N more output lines.` Full output remains in IPython history, while model-facing text is bounded and displayed images stay available as image blocks; `%output 8` opens the full text of cell 8 in IPython's pager. User-entered Python cells keep IPython's normal display behavior. Assistant Markdown is rendered through IPython's terminal MIME renderer. A terminal is a stream rather than a notebook document, so these displays are not editable notebook cells.
84
85
 
85
86
  ## JupyterLab
86
87
 
@@ -51,7 +51,8 @@ Inspect this project and tell me what to implement first.
51
51
  Codebind keeps its terminal prompt and internal bookkeeping usable when a tool cell leaves an asyncio loop active on the terminal thread. This also supports sync clients that manage their own loop across tool cells, without changing IPython’s normal top-level `await` behavior.
52
52
 
53
53
  Terminal conversations remain live for the current IPython process. Previous terminal inputs and outputs, including Python cells you ran yourself, enter the model's context when you ask a question. Durable automatic resumption belongs to notebooks, where the notebook file provides an unambiguous conversation identity.
54
- While a question runs, its cell shows `In [*]` and its tools show `In [N]`, as a notebook does. `Ctrl+C` during a question stops the whole turn: it prints a plain `KeyboardInterrupt` and returns to the prompt, whether the interrupt lands in the model stream or in a running tool cell. Model-executed cells appear with IPython's native input counter, syntax highlighting, output prompts, streams, and tracebacks. Assistant Markdown appears before the following tool cell, and tool output appears as it is written. To keep terminal scrollback usable, Codebind previews at most three gray output lines, shortening each line after 80 characters with `...`. Further lines appear as `… N more output lines.` Full output remains in IPython history, while model-facing text is bounded and displayed images stay available as image blocks; `%output 8` opens the full text of cell 8 in IPython's pager. User-entered Python cells keep IPython's normal display behavior. Assistant Markdown is rendered through IPython's terminal MIME renderer. A terminal is a stream rather than a notebook document, so these displays are not editable notebook cells.
54
+
55
+ `Ctrl+C` during a question stops the whole turn: it prints a plain `KeyboardInterrupt` and returns to the prompt, whether the interrupt lands in the model stream or in a running tool cell. Model-executed cells appear with IPython's native input counter, syntax highlighting, output prompts, streams, and tracebacks. Assistant Markdown appears before the following tool cell, and tool output appears as it is written. To keep terminal scrollback usable, Codebind previews at most three gray output lines, shortening each line after 80 characters with `...`. Further lines appear as `… N more output lines.` Full output remains in IPython history, while model-facing text is bounded and displayed images stay available as image blocks; `%output 8` opens the full text of cell 8 in IPython's pager. User-entered Python cells keep IPython's normal display behavior. Assistant Markdown is rendered through IPython's terminal MIME renderer. A terminal is a stream rather than a notebook document, so these displays are not editable notebook cells.
55
56
 
56
57
  ## JupyterLab
57
58
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "codebind"
3
- version = "0.6.20"
3
+ version = "0.6.21"
4
4
  description = "A frontend-neutral model loop for persistent IPython sessions."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.13"
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "codebind"
3
- version = "0.6.20"
3
+ version = "0.6.21"
4
4
  description = "A frontend-neutral model loop for persistent IPython sessions."
5
5
  readme = "README.md"
6
6
  authors = [
@@ -42,8 +42,6 @@ def terminal_mode(shell: TerminalInteractiveShell) -> dict[str, bool]:
42
42
  mode = {
43
43
  "question": False,
44
44
  "running": False,
45
- "submitted": False,
46
- "submitted_count": None,
47
45
  "active_prompt": False,
48
46
  "interrupt_reported": False,
49
47
  "question_text": None,
@@ -398,7 +396,6 @@ def install_question_mode(shell: TerminalInteractiveShell) -> Callable[[], None]
398
396
  mode["question_asked"] = False
399
397
  mode["answered_only"] = False
400
398
  mode["running"] = False
401
- mode["submitted"] = False
402
399
  mode["interrupt_reported"] = False
403
400
  try:
404
401
  try:
@@ -448,12 +445,6 @@ def install_question_mode(shell: TerminalInteractiveShell) -> Callable[[], None]
448
445
  def enter_question(event) -> None:
449
446
  """Enter submits; the prompt session stays open for the next question."""
450
447
  mode["question_asked"] = True
451
- # Set before the prompt closes: the accepted line is drawn once more
452
- # while this flag is still set, which is where In [N] becomes In [*].
453
- # The cell number is latched, because execution_count does not change
454
- # until the cell runs, so the next prompt would otherwise look marked too.
455
- mode["submitted"] = True
456
- mode["submitted_count"] = str(shell.execution_count)
457
448
  event.current_buffer.validate_and_handle()
458
449
 
459
450
  def newline_question(event) -> None:
@@ -489,33 +480,9 @@ def install_question_mode(shell: TerminalInteractiveShell) -> Callable[[], None]
489
480
  else:
490
481
  buffer.reset()
491
482
  mode["question"] = False
492
- mode["submitted"] = False
493
483
  event.app.invalidate()
494
484
 
495
485
  question_active = Condition(lambda: mode["question"])
496
- original_prompt_options = shell._extra_prompt_options
497
-
498
- def prompt_options():
499
- """Let a question's own line show the running marker, In [*].
500
-
501
- The message stays callable so the marker follows the current mode: it is
502
- read when the prompt is drawn, and toggle_question redraws it.
503
- """
504
- options = original_prompt_options()
505
- prompt_tokens = shell.prompts.in_prompt_tokens
506
-
507
- def message():
508
- tokens = prompt_tokens()
509
- counter = str(shell.execution_count)
510
- if counter != mode["submitted_count"]:
511
- return PygmentsTokens(tokens)
512
- marked = [(token, "*" if text == counter else text) for token, text in tokens]
513
- return PygmentsTokens(marked)
514
-
515
- options["message"] = message
516
- return options
517
-
518
- shell._extra_prompt_options = prompt_options
519
486
  original_read_keys = prompt_session.input.read_keys
520
487
  original_showtraceback = shell.showtraceback
521
488
 
@@ -581,7 +548,6 @@ def install_question_mode(shell: TerminalInteractiveShell) -> Callable[[], None]
581
548
  bindings.remove(newline_question)
582
549
  bindings.remove(interrupt_question)
583
550
  transforms.remove(transform_question)
584
- shell._extra_prompt_options = original_prompt_options
585
551
  shell.showtraceback = original_showtraceback
586
552
  prompt_session.input.read_keys = original_read_keys
587
553
  if had_prompt_override:
File without changes
File without changes