dialoghelper 0.0.18__py3-none-any.whl → 0.0.19__py3-none-any.whl
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.
- dialoghelper/__init__.py +1 -1
- dialoghelper/core.py +7 -4
- {dialoghelper-0.0.18.dist-info → dialoghelper-0.0.19.dist-info}/METADATA +1 -1
- dialoghelper-0.0.19.dist-info/RECORD +10 -0
- dialoghelper-0.0.18.dist-info/RECORD +0 -10
- {dialoghelper-0.0.18.dist-info → dialoghelper-0.0.19.dist-info}/WHEEL +0 -0
- {dialoghelper-0.0.18.dist-info → dialoghelper-0.0.19.dist-info}/entry_points.txt +0 -0
- {dialoghelper-0.0.18.dist-info → dialoghelper-0.0.19.dist-info}/licenses/LICENSE +0 -0
- {dialoghelper-0.0.18.dist-info → dialoghelper-0.0.19.dist-info}/top_level.txt +0 -0
dialoghelper/__init__.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
__version__ = "0.0.
|
|
1
|
+
__version__ = "0.0.19"
|
|
2
2
|
from .core import *
|
dialoghelper/core.py
CHANGED
|
@@ -109,24 +109,28 @@ def add_msg(
|
|
|
109
109
|
o_collapsed: int | None = 0, # Collapse output?
|
|
110
110
|
heading_collapsed: int | None = 0, # Collapse heading section?
|
|
111
111
|
pinned: int | None = 0, # Pin to context?
|
|
112
|
-
|
|
112
|
+
):
|
|
113
113
|
"Add/update a message to the queue to show after code execution completes."
|
|
114
114
|
if placement not in ('at_start','at_end') and not msgid: msgid = find_msg_id()
|
|
115
115
|
return call_endp(
|
|
116
116
|
'add_relative_', content=content, placement=placement, msgid=msgid, msg_type=msg_type, output=output,
|
|
117
117
|
time_run=time_run, is_exported=is_exported, skipped=skipped, pinned=pinned,
|
|
118
|
-
i_collapsed=i_collapsed, o_collapsed=o_collapsed, heading_collapsed=heading_collapsed
|
|
118
|
+
i_collapsed=i_collapsed, o_collapsed=o_collapsed, heading_collapsed=heading_collapsed)
|
|
119
119
|
|
|
120
120
|
# %% ../nbs/00_core.ipynb
|
|
121
121
|
@delegates(add_msg)
|
|
122
122
|
def _add_msg_unsafe(
|
|
123
123
|
content:str, # Content of the message (i.e the message prompt, code, or note text)
|
|
124
|
+
placement:str='add_after', # Can be 'add_after', 'add_before', 'at_start', 'at_end'
|
|
125
|
+
msgid:str=None, # id of message that placement is relative to (if None, uses current message)
|
|
124
126
|
run:bool=False, # For prompts, send it to the AI; for code, execute it (*DANGEROUS -- be careful of what you run!)
|
|
125
127
|
**kwargs
|
|
126
128
|
):
|
|
127
129
|
"""Add/update a message to the queue to show after code execution completes, and optionally run it. Be sure to pass a `sid` (stable id) not a `mid` (which is used only for sorting, and can change).
|
|
128
130
|
*WARNING*--This can execute arbitrary code, so check carefully what you run!--*WARNING"""
|
|
129
|
-
|
|
131
|
+
if placement not in ('at_start','at_end') and not msgid: msgid = find_msg_id()
|
|
132
|
+
return call_endp(
|
|
133
|
+
'add_relative_', content=content, placement=placement, msgid=msgid, run=run, **kwargs)
|
|
130
134
|
|
|
131
135
|
# %% ../nbs/00_core.ipynb
|
|
132
136
|
def _umsg(
|
|
@@ -225,7 +229,6 @@ def tool_info():
|
|
|
225
229
|
cts='''Tools available from `dialoghelper`:
|
|
226
230
|
|
|
227
231
|
- &`add_html`: Send HTML to the browser to be swapped into the DOM using hx-swap-oob.
|
|
228
|
-
- &`find_dialog_id`: Get the current dialog id.
|
|
229
232
|
- &`find_msg_id`: Get the current message id.
|
|
230
233
|
- &`find_msgs`: Find messages in current specific dialog that contain the given information.
|
|
231
234
|
- &`read_msg`: Get the message indexed in the current dialog.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
dialoghelper/__init__.py,sha256=mzZnqA6mbnOz6zhKbalyue_2PRAFgiqVOeO3zW7n9Ys,43
|
|
2
|
+
dialoghelper/_modidx.py,sha256=72qT7cHwYbkCIIGIxbikkMQjS0W0zuFeFvkh-Qp4iFE,2535
|
|
3
|
+
dialoghelper/core.py,sha256=4UFZgOKZ9w5NvITz5y5H7efWA-4XrCNoIFh-U4Szl-Y,10552
|
|
4
|
+
dialoghelper/db_dc.py,sha256=mi2Q2am_SoAPGpNQg7KPFS5pR9WEapRXT8ypkNmMfw0,2330
|
|
5
|
+
dialoghelper-0.0.19.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
6
|
+
dialoghelper-0.0.19.dist-info/METADATA,sha256=0ZoKROKIc1r5xqchnGp1TvPP-1J06t9i3oG9CfYblaM,2565
|
|
7
|
+
dialoghelper-0.0.19.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
8
|
+
dialoghelper-0.0.19.dist-info/entry_points.txt,sha256=wvDeX-XTS_XVjWiiPQe6yVfmyNwy9eCr36ewp9baFIg,46
|
|
9
|
+
dialoghelper-0.0.19.dist-info/top_level.txt,sha256=VXLlkgltFs_q-XB9imt2G64I_-MPm1RnxlpvUWPuLKM,13
|
|
10
|
+
dialoghelper-0.0.19.dist-info/RECORD,,
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
dialoghelper/__init__.py,sha256=V4rULLJEoYYsILwNA9eg9WxKpado6anMzsERu_XUspI,43
|
|
2
|
-
dialoghelper/_modidx.py,sha256=72qT7cHwYbkCIIGIxbikkMQjS0W0zuFeFvkh-Qp4iFE,2535
|
|
3
|
-
dialoghelper/core.py,sha256=4TsEKRQlSfG5JZqnbMKVnpJbsS1JaNz5qL0Ch0Pinxc,10291
|
|
4
|
-
dialoghelper/db_dc.py,sha256=mi2Q2am_SoAPGpNQg7KPFS5pR9WEapRXT8ypkNmMfw0,2330
|
|
5
|
-
dialoghelper-0.0.18.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
6
|
-
dialoghelper-0.0.18.dist-info/METADATA,sha256=0a4NdXRHAMrz6C9fhO0zU6qL3d3R6ieqibdSpDygvW0,2565
|
|
7
|
-
dialoghelper-0.0.18.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
8
|
-
dialoghelper-0.0.18.dist-info/entry_points.txt,sha256=wvDeX-XTS_XVjWiiPQe6yVfmyNwy9eCr36ewp9baFIg,46
|
|
9
|
-
dialoghelper-0.0.18.dist-info/top_level.txt,sha256=VXLlkgltFs_q-XB9imt2G64I_-MPm1RnxlpvUWPuLKM,13
|
|
10
|
-
dialoghelper-0.0.18.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|