zettcode-commands 0.4.4__tar.gz → 0.4.6__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.
- {zettcode_commands-0.4.4 → zettcode_commands-0.4.6}/PKG-INFO +7 -7
- {zettcode_commands-0.4.4 → zettcode_commands-0.4.6}/pyproject.toml +6 -6
- {zettcode_commands-0.4.4 → zettcode_commands-0.4.6}/src/zettcode/commands/handlers.py +9 -1
- {zettcode_commands-0.4.4 → zettcode_commands-0.4.6}/.gitignore +0 -0
- {zettcode_commands-0.4.4 → zettcode_commands-0.4.6}/src/zettcode/commands/__init__.py +0 -0
- {zettcode_commands-0.4.4 → zettcode_commands-0.4.6}/src/zettcode/commands/context.py +0 -0
- {zettcode_commands-0.4.4 → zettcode_commands-0.4.6}/src/zettcode/commands/context_charts.py +0 -0
- {zettcode_commands-0.4.4 → zettcode_commands-0.4.6}/src/zettcode/commands/context_page.py +0 -0
- {zettcode_commands-0.4.4 → zettcode_commands-0.4.6}/src/zettcode/commands/hub.py +0 -0
- {zettcode_commands-0.4.4 → zettcode_commands-0.4.6}/src/zettcode/commands/hub_graph.py +0 -0
- {zettcode_commands-0.4.4 → zettcode_commands-0.4.6}/src/zettcode/commands/plugin.py +0 -0
- {zettcode_commands-0.4.4 → zettcode_commands-0.4.6}/src/zettcode/commands/py.typed +0 -0
- {zettcode_commands-0.4.4 → zettcode_commands-0.4.6}/src/zettcode/commands/usage.py +0 -0
- {zettcode_commands-0.4.4 → zettcode_commands-0.4.6}/src/zettcode/commands/usage_page.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: zettcode-commands
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.6
|
|
4
4
|
Summary: The slash commands that act on ZettCode's terminal application, offered to it as a plugin
|
|
5
5
|
Project-URL: Repository, https://github.com/Chang-LeHung/zettcode
|
|
6
6
|
Author: Chang-LeHung
|
|
@@ -15,9 +15,9 @@ Classifier: Programming Language :: Python :: 3.14
|
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.15
|
|
16
16
|
Classifier: Typing :: Typed
|
|
17
17
|
Requires-Python: >=3.10
|
|
18
|
-
Requires-Dist: zettcode-app
|
|
19
|
-
Requires-Dist: zettcode-engine
|
|
20
|
-
Requires-Dist: zettcode-plugin-api
|
|
21
|
-
Requires-Dist: zettcode-presenters
|
|
22
|
-
Requires-Dist: zettcode-sdk
|
|
23
|
-
Requires-Dist: zettcode-tui
|
|
18
|
+
Requires-Dist: zettcode-app<0.5,>=0.4.6
|
|
19
|
+
Requires-Dist: zettcode-engine<0.5,>=0.4.6
|
|
20
|
+
Requires-Dist: zettcode-plugin-api<0.5,>=0.4.6
|
|
21
|
+
Requires-Dist: zettcode-presenters<0.5,>=0.4.6
|
|
22
|
+
Requires-Dist: zettcode-sdk<0.5,>=0.4.6
|
|
23
|
+
Requires-Dist: zettcode-tui<0.5,>=0.4.6
|
|
@@ -18,12 +18,12 @@ classifiers = [
|
|
|
18
18
|
]
|
|
19
19
|
dependencies = [
|
|
20
20
|
# Written against the plugin contract, and the pages the commands open are the application's own widgets.
|
|
21
|
-
"zettcode-plugin-api",
|
|
22
|
-
"zettcode-engine",
|
|
23
|
-
"zettcode-tui",
|
|
24
|
-
"zettcode-sdk",
|
|
25
|
-
"zettcode-app",
|
|
26
|
-
"zettcode-presenters",
|
|
21
|
+
"zettcode-plugin-api>=0.4.6,<0.5",
|
|
22
|
+
"zettcode-engine>=0.4.6,<0.5",
|
|
23
|
+
"zettcode-tui>=0.4.6,<0.5",
|
|
24
|
+
"zettcode-sdk>=0.4.6,<0.5",
|
|
25
|
+
"zettcode-app>=0.4.6,<0.5",
|
|
26
|
+
"zettcode-presenters>=0.4.6,<0.5",
|
|
27
27
|
]
|
|
28
28
|
|
|
29
29
|
# A part of the program, not a plugin: the `[tool.zettcode] plugin = true` marker is what the plugin release line looks for.
|
|
@@ -219,7 +219,9 @@ class ModelCommands(TuiPlugin):
|
|
|
219
219
|
tui = require_tui(ctx)
|
|
220
220
|
# A container built by hand has no link to follow; the menus then offer no words, and the commands still run.
|
|
221
221
|
link = ctx.find(HOST_LINK, HostLink) or HostLink()
|
|
222
|
-
tui.register_command(
|
|
222
|
+
tui.register_command(
|
|
223
|
+
"model", "choose a model", self.model, when_busy="now", subcommands=lambda: model_words(link.host)
|
|
224
|
+
)
|
|
223
225
|
tui.register_command("effort", "how much the model reasons: /effort high", self.effort, when_busy="now")
|
|
224
226
|
tui.register_command(
|
|
225
227
|
"permission",
|
|
@@ -235,6 +237,12 @@ class ModelCommands(TuiPlugin):
|
|
|
235
237
|
The picker is a widget, so the command needs the shell: the agent owns the models, the shell owns the
|
|
236
238
|
widget that chooses between them. A machine with nothing to pick has no model at all, so the command points
|
|
237
239
|
at the one that adds the first entry instead of opening an empty list.
|
|
240
|
+
|
|
241
|
+
It runs beside a request rather than waiting for it: the request in flight was handed its provider when it
|
|
242
|
+
started and is not sent again, so the model under it does not change, and everything that runs after it —
|
|
243
|
+
the next turn, a side question, a compaction — is built from the one chosen here. Choosing a model also
|
|
244
|
+
moves the point the conversation is compacted at, because that is the new model's window, and a compaction
|
|
245
|
+
the new window asks for sooner is a request of its own, not a change to the one running.
|
|
238
246
|
"""
|
|
239
247
|
host = context.require_host()
|
|
240
248
|
if host.client.active_model is None and not host.client.models:
|
|
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
|