streamlit-nightly 1.42.3.dev20250225__py2.py3-none-any.whl → 1.42.3.dev20250227__py2.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.
- streamlit/commands/navigation.py +16 -4
- streamlit/commands/page_config.py +1 -2
- streamlit/config.py +11 -4
- streamlit/elements/widgets/button.py +5 -7
- streamlit/elements/widgets/chat.py +101 -18
- streamlit/elements/widgets/file_uploader.py +20 -10
- streamlit/errors.py +11 -9
- streamlit/navigation/page.py +2 -10
- streamlit/proto/ChatInput_pb2.py +6 -6
- streamlit/proto/ChatInput_pb2.pyi +5 -1
- streamlit/proto/ClientState_pb2.py +5 -3
- streamlit/proto/ClientState_pb2.pyi +29 -2
- streamlit/proto/ForwardMsg_pb2.py +12 -10
- streamlit/proto/NewSession_pb2.py +16 -16
- streamlit/proto/NewSession_pb2.pyi +9 -9
- streamlit/proto/PagesChanged_pb2.pyi +3 -1
- streamlit/runtime/app_session.py +6 -13
- streamlit/runtime/context.py +19 -0
- streamlit/runtime/pages_manager.py +61 -232
- streamlit/runtime/scriptrunner/script_runner.py +51 -2
- streamlit/runtime/scriptrunner_utils/script_requests.py +7 -1
- streamlit/runtime/scriptrunner_utils/script_run_context.py +5 -1
- streamlit/source_util.py +4 -90
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/{FileDownload.esm.BlYgQAwd.js → FileDownload.esm.rdZtCw5-.js} +1 -1
- streamlit/static/static/js/FileHelper.BztOEKJy.js +5 -0
- streamlit/static/static/js/{FormClearHelper.B4WYSqDL.js → FormClearHelper.Drd1fMJc.js} +1 -1
- streamlit/static/static/js/{Hooks.BoeFlDaA.js → Hooks.DWd0hyk4.js} +1 -1
- streamlit/static/static/js/{InputInstructions.DiPa6u6x.js → InputInstructions.B7xrWTG0.js} +1 -1
- streamlit/static/static/js/{ProgressBar.B-iCNc1a.js → ProgressBar.CBgJiTH-.js} +1 -1
- streamlit/static/static/js/{RenderInPortalIfExists.DPgp77ia.js → RenderInPortalIfExists.US28tQOn.js} +1 -1
- streamlit/static/static/js/{Toolbar.9G2Er6_r.js → Toolbar.CAOt-xaL.js} +1 -1
- streamlit/static/static/js/{base-input.z22leTiB.js → base-input.CauNaJqr.js} +1 -1
- streamlit/static/static/js/{checkbox.DT5JbCKx.js → checkbox.ChzWCtre.js} +1 -1
- streamlit/static/static/js/{createSuper.9dngDO4F.js → createSuper.D_39RJB6.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.DnBgrJEy.js → data-grid-overlay-editor.rIelkOVS.js} +1 -1
- streamlit/static/static/js/{downloader.BgiOz4Dy.js → downloader.Dz5I28nG.js} +1 -1
- streamlit/static/static/js/{es6.C2nbxS8x.js → es6.DwnEjMMn.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.XvWZp7Dg.js → iframeResizer.contentWindow.BRiRifwd.js} +1 -1
- streamlit/static/static/js/{index.DkwDCuk1.js → index.BE6MTF-B.js} +1 -1
- streamlit/static/static/js/{index.DMreumKF.js → index.BUdhIGhT.js} +1 -1
- streamlit/static/static/js/{index.Bgn4z-Mp.js → index.BWeYb5ES.js} +1 -1
- streamlit/static/static/js/{index.exPoJHIW.js → index.Bb4OB39A.js} +1 -1
- streamlit/static/static/js/{index.T5vKsEVA.js → index.BrAW6bFJ.js} +1 -1
- streamlit/static/static/js/{index.D5wciRNz.js → index.CAHGh74D.js} +1 -1
- streamlit/static/static/js/{index.CrNuA-BG.js → index.CBre8Aui.js} +1 -1
- streamlit/static/static/js/{index.CMvo7Iwl.js → index.CM12P2T1.js} +1 -1
- streamlit/static/static/js/{index.DZ_FHOJd.js → index.CO3dZWKG.js} +1 -1
- streamlit/static/static/js/{index.BFYGskaf.js → index.CUz1_nAm.js} +1 -1
- streamlit/static/static/js/{index.DTP3exjF.js → index.C_C365T5.js} +1 -1
- streamlit/static/static/js/{index.CAC6FyHh.js → index.CmYiLKNX.js} +1 -1
- streamlit/static/static/js/{index.bDDanN90.js → index.CoUzNoRf.js} +1 -1
- streamlit/static/static/js/{index.DcXXaGYK.js → index.Ct7MPsA3.js} +1 -1
- streamlit/static/static/js/{index.UrE-Phqy.js → index.D1K6NCBQ.js} +1 -1
- streamlit/static/static/js/{index.D9bqDCB_.js → index.D2xM-XzG.js} +1 -1
- streamlit/static/static/js/{index.BTK3gx3H.js → index.D9rv1PQ0.js} +1 -1
- streamlit/static/static/js/{index.BdtKHTgl.js → index.DIeegLbv.js} +1 -1
- streamlit/static/static/js/{index.pWHQEj0Q.js → index.DJvwxFLn.js} +1 -1
- streamlit/static/static/js/{index.CBoIJv6M.js → index.DKuQg2D4.js} +1 -1
- streamlit/static/static/js/{index.DjTdTgti.js → index.DWFLx6Tc.js} +11 -11
- streamlit/static/static/js/{index.DC6PJYZU.js → index.DYUhWSq6.js} +1 -1
- streamlit/static/static/js/{index.rECpAXqX.js → index.Db3jGJxa.js} +1 -1
- streamlit/static/static/js/{index.BDSGWkr0.js → index.DfNAkKAr.js} +145 -145
- streamlit/static/static/js/{index.C5bx6jEW.js → index.DgNQKEeQ.js} +1 -1
- streamlit/static/static/js/{index.BkyYp5Em.js → index.Dj91melR.js} +1 -1
- streamlit/static/static/js/{index.Hnms5TSS.js → index.DkKZlAsv.js} +1 -1
- streamlit/static/static/js/index.DkgVNhWs.js +1 -0
- streamlit/static/static/js/{index.D-9nQW74.js → index.Dzp8iBkF.js} +1 -1
- streamlit/static/static/js/index.LL2DLZZA.js +201 -0
- streamlit/static/static/js/index.ORHz8Y8P.js +4537 -0
- streamlit/static/static/js/{index.CBYIbEuv.js → index.V3Vj2d9m.js} +1 -1
- streamlit/static/static/js/{index.B5-iXfzx.js → index.YNWoT4uW.js} +1 -1
- streamlit/static/static/js/index.aL_kqyvR.js +1 -0
- streamlit/static/static/js/{index.JgS0whqe.js → index.fP6rBxlc.js} +1 -1
- streamlit/static/static/js/{index.BxYliQ9c.js → index.pvQjxG7y.js} +1 -1
- streamlit/static/static/js/{index.BNc20KTN.js → index.wxpL02VY.js} +1 -1
- streamlit/static/static/js/{input.mCBQrtCY.js → input.D_dn5-2t.js} +1 -1
- streamlit/static/static/js/{memory.Te_zHgq3.js → memory.pnMTtWQR.js} +1 -1
- streamlit/static/static/js/{mergeWith.Di9Yv3PE.js → mergeWith.CRrYodeI.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.Du6B2U8c.js → number-overlay-editor.C65GBS2P.js} +1 -1
- streamlit/static/static/js/{possibleConstructorReturn.DqqPe-iu.js → possibleConstructorReturn.BnQk7lq_.js} +1 -1
- streamlit/static/static/js/{sandbox.iqWXuowq.js → sandbox.CrxXt1li.js} +1 -1
- streamlit/static/static/js/{textarea.DUN7d2zN.js → textarea.DiFyO5JY.js} +1 -1
- streamlit/static/static/js/{timepicker.BkmEJ-b8.js → timepicker.B1Y7LIk4.js} +1 -1
- streamlit/static/static/js/{toConsumableArray.D4OFzlWy.js → toConsumableArray.BWpBUK-j.js} +1 -1
- streamlit/static/static/js/{uniqueId.6OlKTkzK.js → uniqueId.7ecIUkUs.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.Btr3rzhN.js → useBasicWidgetState.deG0KPm0.js} +1 -1
- streamlit/static/static/js/{useOnInputChange.BM7LVpC-.js → useOnInputChange.CQ7sD7CO.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.BCTIo1o2.js → withFullScreenWrapper.D0wnBu3k.js} +1 -1
- streamlit/testing/v1/app_test.py +8 -10
- {streamlit_nightly-1.42.3.dev20250225.dist-info → streamlit_nightly-1.42.3.dev20250227.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.42.3.dev20250225.dist-info → streamlit_nightly-1.42.3.dev20250227.dist-info}/RECORD +96 -96
- {streamlit_nightly-1.42.3.dev20250225.dist-info → streamlit_nightly-1.42.3.dev20250227.dist-info}/WHEEL +1 -1
- streamlit/static/static/js/FileHelper.Da-FUCX4.js +0 -5
- streamlit/static/static/js/index.BiPYzGZi.js +0 -1
- streamlit/static/static/js/index.DV46EgCO.js +0 -201
- streamlit/static/static/js/index.DyyHt_xV.js +0 -1
- streamlit/static/static/js/index.qC8qMz0q.js +0 -3865
- {streamlit_nightly-1.42.3.dev20250225.data → streamlit_nightly-1.42.3.dev20250227.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.42.3.dev20250225.dist-info → streamlit_nightly-1.42.3.dev20250227.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.42.3.dev20250225.dist-info → streamlit_nightly-1.42.3.dev20250227.dist-info}/top_level.txt +0 -0
streamlit/commands/navigation.py
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
from __future__ import annotations
|
16
16
|
|
17
17
|
from pathlib import Path
|
18
|
-
from typing import TYPE_CHECKING, Callable, Literal
|
18
|
+
from typing import TYPE_CHECKING, Callable, Literal, Union
|
19
19
|
|
20
20
|
from typing_extensions import TypeAlias
|
21
21
|
|
@@ -25,6 +25,7 @@ from streamlit.navigation.page import StreamlitPage
|
|
25
25
|
from streamlit.proto.ForwardMsg_pb2 import ForwardMsg
|
26
26
|
from streamlit.proto.Navigation_pb2 import Navigation as NavigationProto
|
27
27
|
from streamlit.runtime.metrics_util import gather_metrics
|
28
|
+
from streamlit.runtime.pages_manager import PagesManager
|
28
29
|
from streamlit.runtime.scriptrunner_utils.script_run_context import (
|
29
30
|
ScriptRunContext,
|
30
31
|
get_script_run_ctx,
|
@@ -34,6 +35,7 @@ if TYPE_CHECKING:
|
|
34
35
|
from streamlit.source_util import PageHash, PageInfo
|
35
36
|
|
36
37
|
SectionHeader: TypeAlias = str
|
38
|
+
PageType: TypeAlias = Union[str, Path, Callable[[], None], StreamlitPage]
|
37
39
|
|
38
40
|
|
39
41
|
def convert_to_streamlit_page(
|
@@ -78,8 +80,7 @@ def send_page_not_found(ctx: ScriptRunContext):
|
|
78
80
|
|
79
81
|
@gather_metrics("navigation")
|
80
82
|
def navigation(
|
81
|
-
pages: list[
|
82
|
-
| dict[SectionHeader, list[str | Path | Callable[[], None] | StreamlitPage]],
|
83
|
+
pages: list[PageType] | dict[SectionHeader, list[PageType]],
|
83
84
|
*,
|
84
85
|
position: Literal["sidebar", "hidden"] = "sidebar",
|
85
86
|
expanded: bool = False,
|
@@ -214,6 +215,18 @@ def navigation(
|
|
214
215
|
- The first page is automatically set as default if none specified
|
215
216
|
- Common widgets should be defined in the entrypoint file for state sharing
|
216
217
|
"""
|
218
|
+
# Disable the use of the pages feature (ie disregard v1 behavior of Multipage Apps)
|
219
|
+
PagesManager.uses_pages_directory = False
|
220
|
+
|
221
|
+
return _navigation(pages, position=position, expanded=expanded)
|
222
|
+
|
223
|
+
|
224
|
+
def _navigation(
|
225
|
+
pages: list[PageType] | dict[SectionHeader, list[PageType]],
|
226
|
+
*,
|
227
|
+
position: Literal["sidebar", "hidden"],
|
228
|
+
expanded: bool,
|
229
|
+
) -> StreamlitPage:
|
217
230
|
if isinstance(pages, list):
|
218
231
|
converted_pages = [convert_to_streamlit_page(p) for p in pages]
|
219
232
|
nav_sections = {"": converted_pages}
|
@@ -222,7 +235,6 @@ def navigation(
|
|
222
235
|
section: [convert_to_streamlit_page(p) for p in section_pages]
|
223
236
|
for section, section_pages in pages.items()
|
224
237
|
}
|
225
|
-
|
226
238
|
page_list = pages_from_nav_sections(nav_sections)
|
227
239
|
|
228
240
|
if not page_list:
|
@@ -165,8 +165,7 @@ def set_page_config(
|
|
165
165
|
https://share.streamlit.io/streamlit/emoji-shortcodes.
|
166
166
|
|
167
167
|
- The string literal, ``"random"``. You can set ``page_icon="random"``
|
168
|
-
to set a random emoji from the supported list above.
|
169
|
-
courtesy of Twemoji and loaded from MaxCDN.
|
168
|
+
to set a random emoji from the supported list above.
|
170
169
|
|
171
170
|
- An icon from the Material Symbols library (rounded style) in the
|
172
171
|
format ``":material/icon_name:"`` where "icon_name" is the name
|
streamlit/config.py
CHANGED
@@ -1021,6 +1021,7 @@ _create_option(
|
|
1021
1021
|
_create_option(
|
1022
1022
|
"theme.linkColor",
|
1023
1023
|
description="Color used for all links.",
|
1024
|
+
visibility="hidden",
|
1024
1025
|
)
|
1025
1026
|
|
1026
1027
|
_create_option(
|
@@ -1038,6 +1039,7 @@ _create_option(
|
|
1038
1039
|
The font family to use for code (monospace) in the app.
|
1039
1040
|
To use a custom font, it needs to be added via [theme.fontFaces].
|
1040
1041
|
""",
|
1042
|
+
visibility="hidden",
|
1041
1043
|
)
|
1042
1044
|
|
1043
1045
|
_create_option(
|
@@ -1045,16 +1047,18 @@ _create_option(
|
|
1045
1047
|
description="""
|
1046
1048
|
Configure a list of font faces that you can use for the app & code fonts.
|
1047
1049
|
""",
|
1050
|
+
visibility="hidden",
|
1048
1051
|
)
|
1049
1052
|
|
1050
1053
|
|
1051
1054
|
_create_option(
|
1052
|
-
"theme.
|
1055
|
+
"theme.baseRadius",
|
1053
1056
|
description="""
|
1054
|
-
The
|
1055
|
-
|
1057
|
+
The radius used as basis for the corners of most UI elements. Can be:
|
1058
|
+
"none", "small", "medium", "large", "full", or the number in pixel or rem.
|
1059
|
+
For example: "10px", "0.5rem", "1.2rem", "2rem".
|
1056
1060
|
""",
|
1057
|
-
|
1061
|
+
visibility="hidden",
|
1058
1062
|
)
|
1059
1063
|
|
1060
1064
|
_create_option(
|
@@ -1062,6 +1066,7 @@ _create_option(
|
|
1062
1066
|
description="""
|
1063
1067
|
The color of the border around elements.
|
1064
1068
|
""",
|
1069
|
+
visibility="hidden",
|
1065
1070
|
)
|
1066
1071
|
|
1067
1072
|
_create_option(
|
@@ -1071,6 +1076,7 @@ _create_option(
|
|
1071
1076
|
file_uploader, etc).
|
1072
1077
|
""",
|
1073
1078
|
type_=bool,
|
1079
|
+
visibility="hidden",
|
1074
1080
|
)
|
1075
1081
|
|
1076
1082
|
_create_option(
|
@@ -1080,6 +1086,7 @@ _create_option(
|
|
1080
1086
|
scale of text and UI elements. The default base font size is 16.
|
1081
1087
|
""",
|
1082
1088
|
type_=int,
|
1089
|
+
visibility="hidden",
|
1083
1090
|
)
|
1084
1091
|
|
1085
1092
|
# Config Section: Secrets #
|
@@ -52,6 +52,7 @@ from streamlit.proto.DownloadButton_pb2 import DownloadButton as DownloadButtonP
|
|
52
52
|
from streamlit.proto.LinkButton_pb2 import LinkButton as LinkButtonProto
|
53
53
|
from streamlit.proto.PageLink_pb2 import PageLink as PageLinkProto
|
54
54
|
from streamlit.runtime.metrics_util import gather_metrics
|
55
|
+
from streamlit.runtime.pages_manager import PagesManager
|
55
56
|
from streamlit.runtime.scriptrunner import ScriptRunContext, get_script_run_ctx
|
56
57
|
from streamlit.runtime.state import (
|
57
58
|
WidgetArgs,
|
@@ -883,22 +884,19 @@ class ButtonMixin:
|
|
883
884
|
for page_data in all_app_pages.values():
|
884
885
|
full_path = page_data["script_path"]
|
885
886
|
page_name = page_data["page_name"]
|
887
|
+
url_pathname = page_data["url_pathname"]
|
886
888
|
if requested_page == full_path:
|
887
889
|
if label is None:
|
888
|
-
page_link_proto.label = page_name
|
890
|
+
page_link_proto.label = page_name
|
889
891
|
page_link_proto.page_script_hash = page_data["page_script_hash"]
|
890
|
-
page_link_proto.page =
|
892
|
+
page_link_proto.page = url_pathname
|
891
893
|
break
|
892
894
|
|
893
895
|
if page_link_proto.page_script_hash == "":
|
894
|
-
is_mpa_v2 = (
|
895
|
-
ctx.pages_manager is not None and ctx.pages_manager.mpa_version == 2
|
896
|
-
)
|
897
|
-
|
898
896
|
raise StreamlitPageNotFoundError(
|
899
|
-
is_mpa_v2=is_mpa_v2,
|
900
897
|
page=page,
|
901
898
|
main_script_directory=main_script_directory,
|
899
|
+
uses_pages_directory=bool(PagesManager.uses_pages_directory),
|
902
900
|
)
|
903
901
|
|
904
902
|
return self.dg._enqueue("page_link", page_link_proto)
|
@@ -25,7 +25,7 @@ from typing import (
|
|
25
25
|
overload,
|
26
26
|
)
|
27
27
|
|
28
|
-
from streamlit import runtime
|
28
|
+
from streamlit import config, runtime
|
29
29
|
from streamlit.delta_generator_singletons import get_dg_singleton_instance
|
30
30
|
from streamlit.elements.lib.file_uploader_utils import normalize_upload_file_type
|
31
31
|
from streamlit.elements.lib.form_utils import is_in_form
|
@@ -374,9 +374,9 @@ class ChatMixin:
|
|
374
374
|
Parameters
|
375
375
|
----------
|
376
376
|
placeholder : str
|
377
|
-
A placeholder text shown when the chat input is empty.
|
378
|
-
"Your message"
|
379
|
-
empty string.
|
377
|
+
A placeholder text shown when the chat input is empty. This
|
378
|
+
defaults to ``"Your message"``. For accessibility reasons, you
|
379
|
+
should not use an empty string.
|
380
380
|
|
381
381
|
key : str or int
|
382
382
|
An optional string or integer to use as the unique key for the widget.
|
@@ -384,19 +384,44 @@ class ChatMixin:
|
|
384
384
|
its content. No two widgets may have the same key.
|
385
385
|
|
386
386
|
max_chars : int or None
|
387
|
-
The maximum number of characters that can be entered. If
|
388
|
-
(default), there will be no maximum.
|
387
|
+
The maximum number of characters that can be entered. If this is
|
388
|
+
``None`` (default), there will be no maximum.
|
389
389
|
|
390
|
-
accept_file : bool
|
391
|
-
Whether the chat input should accept files.
|
392
|
-
|
390
|
+
accept_file : bool or str
|
391
|
+
Whether the chat input should accept files. This can be one of the
|
392
|
+
following values:
|
393
393
|
|
394
|
-
|
395
|
-
|
394
|
+
- ``False`` (default): No files are accepted and the user can only
|
395
|
+
submit a message.
|
396
|
+
- ``True``: The user can add a single file to their submission.
|
397
|
+
- ``"multiple"``: The user can add multiple files to their
|
398
|
+
submission.
|
399
|
+
|
400
|
+
When the widget is configured to accept files, the accepted file
|
401
|
+
types can be configured with the ``file_type`` parameter.
|
402
|
+
|
403
|
+
By default, uploaded files are limited to 200 MB each. You can
|
404
|
+
configure this using the ``server.maxUploadSize`` config option.
|
405
|
+
For more information on how to set config options, see
|
406
|
+
|config.toml|_.
|
407
|
+
|
408
|
+
.. |config.toml| replace:: ``config.toml``
|
409
|
+
.. _config.toml: https://docs.streamlit.io/develop/api-reference/configuration/config.toml
|
410
|
+
|
411
|
+
file_type : str, Sequence[str], or None
|
412
|
+
The allowed file extension(s) for uploaded files. This can be one
|
413
|
+
of the following types:
|
396
414
|
|
397
|
-
|
398
|
-
|
399
|
-
|
415
|
+
- ``None`` (default): All file extensions are allowed.
|
416
|
+
- A string: A single file extension is allowed. For example, to
|
417
|
+
only accept CSV files, use ``"csv"``.
|
418
|
+
- A sequence of strings: Multiple file extensions are allowed. For
|
419
|
+
example, to only accept JPG/JPEG and PNG files, use
|
420
|
+
``["jpg", "jpeg", "png"]``.
|
421
|
+
|
422
|
+
disabled : bool
|
423
|
+
Whether the chat input should be disabled. This defaults to
|
424
|
+
``False``.
|
400
425
|
|
401
426
|
on_submit : callable
|
402
427
|
An optional callback invoked when the chat input's value is submitted.
|
@@ -409,12 +434,41 @@ class ChatMixin:
|
|
409
434
|
|
410
435
|
Returns
|
411
436
|
-------
|
412
|
-
str or
|
413
|
-
The
|
414
|
-
|
437
|
+
None, str, or dict-like
|
438
|
+
The user's submission. This is one of the following types:
|
439
|
+
|
440
|
+
- ``None``: If the user didn't submit a message or file in the last
|
441
|
+
rerun, the widget returns ``None``.
|
442
|
+
- A string: When the widget is not configured to accept files and
|
443
|
+
the user submitted a message in the last rerun, the widget
|
444
|
+
returns the user's message as a string.
|
445
|
+
- A dict-like object: When the widget is configured to accept files
|
446
|
+
and the user submitted a message and/or file(s) in the last
|
447
|
+
rerun, the widget returns a dict-like object with two attributes,
|
448
|
+
``text`` and ``files``.
|
449
|
+
|
450
|
+
When the widget is configured to accept files and the user submits
|
451
|
+
something in the last rerun, you can access the user's submission
|
452
|
+
with key or attribute notation from the dict-like object. This is
|
453
|
+
shown in Example 3 below.
|
454
|
+
|
455
|
+
The ``text`` attribute holds a string, which is the user's message.
|
456
|
+
This is an empty string if the user only submitted one or more
|
457
|
+
files.
|
458
|
+
|
459
|
+
The ``files`` attribute holds a list of UploadedFile objects.
|
460
|
+
The list is empty if the user only submitted a message. Unlike
|
461
|
+
``st.file_uploader``, this attribute always returns a list, even
|
462
|
+
when the widget is configured to accept only one file at a time.
|
463
|
+
|
464
|
+
The UploadedFile class is a subclass of BytesIO, and therefore is
|
465
|
+
"file-like". This means you can pass an instance of it anywhere a
|
466
|
+
file is expected.
|
415
467
|
|
416
468
|
Examples
|
417
469
|
--------
|
470
|
+
**Example 1: Pin the the chat input widget to the bottom of your app**
|
471
|
+
|
418
472
|
When ``st.chat_input`` is used in the main body of an app, it will be
|
419
473
|
pinned to the bottom of the page.
|
420
474
|
|
@@ -428,9 +482,11 @@ class ChatMixin:
|
|
428
482
|
https://doc-chat-input.streamlit.app/
|
429
483
|
height: 350px
|
430
484
|
|
485
|
+
**Example 2: Use the chat input widget inline**
|
486
|
+
|
431
487
|
The chat input can also be used inline by nesting it inside any layout
|
432
488
|
container (container, columns, tabs, sidebar, etc) or fragment. Create
|
433
|
-
chat interfaces embedded next to other content or have multiple
|
489
|
+
chat interfaces embedded next to other content, or have multiple
|
434
490
|
chatbots!
|
435
491
|
|
436
492
|
>>> import streamlit as st
|
@@ -444,6 +500,32 @@ class ChatMixin:
|
|
444
500
|
.. output ::
|
445
501
|
https://doc-chat-input-inline.streamlit.app/
|
446
502
|
height: 350px
|
503
|
+
|
504
|
+
**Example 3: Let users upload files**
|
505
|
+
|
506
|
+
When you configure your chat input widget to allow file attachments, it
|
507
|
+
will return a dict-like object when the user sends a submission. You
|
508
|
+
can access the user's message through the ``text`` attribute of this
|
509
|
+
dictionary. You can access a list of the user's submitted file(s)
|
510
|
+
through the ``files`` attribute. Similar to ``st.session_state``, you
|
511
|
+
can use key or attribute notation.
|
512
|
+
|
513
|
+
>>> import streamlit as st
|
514
|
+
>>>
|
515
|
+
>>> prompt = st.chat_input(
|
516
|
+
>>> "Say something and/or attach an image",
|
517
|
+
>>> accept_file=True,
|
518
|
+
>>> file_type=["jpg", "jpeg", "png"],
|
519
|
+
>>> )
|
520
|
+
>>> if prompt and prompt.text:
|
521
|
+
>>> st.markdown(prompt.text)
|
522
|
+
>>> if prompt and prompt["files"]:
|
523
|
+
>>> st.image(prompt["files"][0])
|
524
|
+
|
525
|
+
.. output ::
|
526
|
+
https://doc-chat-input-file-uploader.streamlit.app/
|
527
|
+
height: 350px
|
528
|
+
|
447
529
|
"""
|
448
530
|
# We default to an empty string here and disallow user choice intentionally
|
449
531
|
default = ""
|
@@ -515,6 +597,7 @@ class ChatMixin:
|
|
515
597
|
)
|
516
598
|
|
517
599
|
chat_input_proto.file_type[:] = file_type if file_type is not None else []
|
600
|
+
chat_input_proto.max_upload_size_mb = config.get_option("server.maxUploadSize")
|
518
601
|
|
519
602
|
serde = ChatInputSerde(accept_files=bool(accept_file))
|
520
603
|
widget_state = register_widget( # type: ignore[misc]
|
@@ -235,10 +235,12 @@ class FileUploaderMixin:
|
|
235
235
|
label_visibility: LabelVisibility = "visible",
|
236
236
|
) -> UploadedFile | list[UploadedFile] | None:
|
237
237
|
r"""Display a file uploader widget.
|
238
|
-
By default, uploaded files are limited to
|
239
|
-
this using the ``server.maxUploadSize`` config option. For
|
240
|
-
on how to set config options, see
|
241
|
-
|
238
|
+
By default, uploaded files are limited to 200 MB each. You can
|
239
|
+
configure this using the ``server.maxUploadSize`` config option. For
|
240
|
+
more information on how to set config options, see |config.toml|_.
|
241
|
+
|
242
|
+
.. |config.toml| replace:: ``config.toml``
|
243
|
+
.. _config.toml: https://docs.streamlit.io/develop/api-reference/configuration/config.toml
|
242
244
|
|
243
245
|
Parameters
|
244
246
|
----------
|
@@ -265,13 +267,21 @@ class FileUploaderMixin:
|
|
265
267
|
.. _st.markdown: https://docs.streamlit.io/develop/api-reference/text/st.markdown
|
266
268
|
|
267
269
|
type : str or list of str or None
|
268
|
-
|
269
|
-
|
270
|
+
The allowed file extension(s) for uploaded files. This can be one
|
271
|
+
of the following types:
|
272
|
+
|
273
|
+
- ``None`` (default): All file extensions are allowed.
|
274
|
+
- A string: A single file extension is allowed. For example, to
|
275
|
+
only accept CSV files, use ``"csv"``.
|
276
|
+
- A sequence of strings: Multiple file extensions are allowed. For
|
277
|
+
example, to only accept JPG/JPEG and PNG files, use
|
278
|
+
``["jpg", "jpeg", "png"]``.
|
270
279
|
|
271
280
|
accept_multiple_files : bool
|
272
|
-
|
273
|
-
|
274
|
-
|
281
|
+
Whether to accept more than one file in a submission. If this is
|
282
|
+
``False`` (default), the user can only submit one file at a time.
|
283
|
+
If this is ``True``, the user can upload multiple files at the same
|
284
|
+
time, in which case the return value will be a list of files.
|
275
285
|
|
276
286
|
key : str or int
|
277
287
|
An optional string or integer to use as the unique key for the widget.
|
@@ -309,7 +319,7 @@ class FileUploaderMixin:
|
|
309
319
|
|
310
320
|
Returns
|
311
321
|
-------
|
312
|
-
None
|
322
|
+
None, UploadedFile, or list of UploadedFile
|
313
323
|
- If accept_multiple_files is False, returns either None or
|
314
324
|
an UploadedFile object.
|
315
325
|
- If accept_multiple_files is True, returns a list with the
|
streamlit/errors.py
CHANGED
@@ -376,21 +376,23 @@ class StreamlitMissingPageLabelError(LocalizableStreamlitException):
|
|
376
376
|
class StreamlitPageNotFoundError(LocalizableStreamlitException):
|
377
377
|
"""Exception raised the linked page can not be found."""
|
378
378
|
|
379
|
-
def __init__(
|
379
|
+
def __init__(
|
380
|
+
self, page: str, main_script_directory: str, uses_pages_directory: bool
|
381
|
+
):
|
380
382
|
directory = os.path.basename(main_script_directory)
|
381
383
|
|
382
384
|
message = (
|
383
|
-
"Could not find page: `{page}`. You must provide a
|
384
|
-
"relative to the entrypoint file
|
385
|
-
"
|
385
|
+
"Could not find page: `{page}`. You must provide a `StreamlitPage` "
|
386
|
+
"object or file path relative to the entrypoint file. Only pages "
|
387
|
+
"previously defined by `st.Page` and passed to `st.navigation` are "
|
388
|
+
"allowed."
|
386
389
|
)
|
387
390
|
|
388
|
-
if
|
391
|
+
if uses_pages_directory:
|
389
392
|
message = (
|
390
|
-
"Could not find page: `{page}`. You must provide a
|
391
|
-
"
|
392
|
-
"
|
393
|
-
"allowed."
|
393
|
+
"Could not find page: `{page}`. You must provide a file path "
|
394
|
+
"relative to the entrypoint file (from the directory `{directory}`). "
|
395
|
+
"Only the entrypoint file and files in the `pages/` directory are supported."
|
394
396
|
)
|
395
397
|
|
396
398
|
super().__init__(
|
streamlit/navigation/page.py
CHANGED
@@ -45,12 +45,7 @@ def Page(
|
|
45
45
|
object to execute the page. You can only run the page returned by
|
46
46
|
``st.navigation``, and you can only run it once per app rerun.
|
47
47
|
|
48
|
-
A page can be defined by a Python file or ``Callable``.
|
49
|
-
as a ``StreamlitPage`` source will have ``__name__ == "__page__"``.
|
50
|
-
Functions used as a ``StreamlitPage`` source will have ``__name__``
|
51
|
-
corresponding to the module they were imported from. Only the entrypoint
|
52
|
-
file and functions defined within the entrypoint file have
|
53
|
-
``__name__ == "__main__"`` to adhere to Python convention.
|
48
|
+
A page can be defined by a Python file or ``Callable``.
|
54
49
|
|
55
50
|
Parameters
|
56
51
|
----------
|
@@ -297,10 +292,7 @@ class StreamlitPage:
|
|
297
292
|
return
|
298
293
|
else:
|
299
294
|
code = ctx.pages_manager.get_page_script_byte_code(str(self._page))
|
300
|
-
|
301
|
-
# We create a module named __page__ for this specific
|
302
|
-
# script. This is differentiate it from the `__main__` module
|
303
|
-
module = types.ModuleType("__page__")
|
295
|
+
module = types.ModuleType("__main__")
|
304
296
|
# We want __file__ to be the path to the script
|
305
297
|
module.__dict__["__file__"] = self._page
|
306
298
|
exec(code, module.__dict__)
|
streamlit/proto/ChatInput_pb2.py
CHANGED
@@ -14,7 +14,7 @@ _sym_db = _symbol_database.Default()
|
|
14
14
|
|
15
15
|
|
16
16
|
|
17
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fstreamlit/proto/ChatInput.proto\"\
|
17
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fstreamlit/proto/ChatInput.proto\"\xd0\x02\n\tChatInput\x12\n\n\x02id\x18\x01 \x01(\t\x12\x13\n\x0bplaceholder\x18\x02 \x01(\t\x12\x11\n\tmax_chars\x18\x03 \x01(\r\x12\x10\n\x08\x64isabled\x18\x04 \x01(\x08\x12\r\n\x05value\x18\x05 \x01(\t\x12\x11\n\tset_value\x18\x06 \x01(\x08\x12\x0f\n\x07\x64\x65\x66\x61ult\x18\x07 \x01(\t\x12%\n\x08position\x18\x08 \x01(\x0e\x32\x13.ChatInput.Position\x12*\n\x0b\x61\x63\x63\x65pt_file\x18\t \x01(\x0e\x32\x15.ChatInput.AcceptFile\x12\x11\n\tfile_type\x18\n \x03(\t\x12\x1a\n\x12max_upload_size_mb\x18\x0b \x01(\x05\"\x16\n\x08Position\x12\n\n\x06\x42OTTOM\x10\x00\"0\n\nAcceptFile\x12\x08\n\x04NONE\x10\x00\x12\n\n\x06SINGLE\x10\x01\x12\x0c\n\x08MULTIPLE\x10\x02\x42.\n\x1c\x63om.snowflake.apps.streamlitB\x0e\x43hatInputProtob\x06proto3')
|
18
18
|
|
19
19
|
_globals = globals()
|
20
20
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
@@ -23,9 +23,9 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
23
23
|
_globals['DESCRIPTOR']._loaded_options = None
|
24
24
|
_globals['DESCRIPTOR']._serialized_options = b'\n\034com.snowflake.apps.streamlitB\016ChatInputProto'
|
25
25
|
_globals['_CHATINPUT']._serialized_start=36
|
26
|
-
_globals['_CHATINPUT']._serialized_end=
|
27
|
-
_globals['_CHATINPUT_POSITION']._serialized_start=
|
28
|
-
_globals['_CHATINPUT_POSITION']._serialized_end=
|
29
|
-
_globals['_CHATINPUT_ACCEPTFILE']._serialized_start=
|
30
|
-
_globals['_CHATINPUT_ACCEPTFILE']._serialized_end=
|
26
|
+
_globals['_CHATINPUT']._serialized_end=372
|
27
|
+
_globals['_CHATINPUT_POSITION']._serialized_start=300
|
28
|
+
_globals['_CHATINPUT_POSITION']._serialized_end=322
|
29
|
+
_globals['_CHATINPUT_ACCEPTFILE']._serialized_start=324
|
30
|
+
_globals['_CHATINPUT_ACCEPTFILE']._serialized_end=372
|
31
31
|
# @@protoc_insertion_point(module_scope)
|
@@ -75,6 +75,7 @@ class ChatInput(google.protobuf.message.Message):
|
|
75
75
|
POSITION_FIELD_NUMBER: builtins.int
|
76
76
|
ACCEPT_FILE_FIELD_NUMBER: builtins.int
|
77
77
|
FILE_TYPE_FIELD_NUMBER: builtins.int
|
78
|
+
MAX_UPLOAD_SIZE_MB_FIELD_NUMBER: builtins.int
|
78
79
|
id: builtins.str
|
79
80
|
placeholder: builtins.str
|
80
81
|
max_chars: builtins.int
|
@@ -84,6 +85,8 @@ class ChatInput(google.protobuf.message.Message):
|
|
84
85
|
default: builtins.str
|
85
86
|
position: global___ChatInput.Position.ValueType
|
86
87
|
accept_file: global___ChatInput.AcceptFile.ValueType
|
88
|
+
max_upload_size_mb: builtins.int
|
89
|
+
"""Max file size allowed by server config"""
|
87
90
|
@property
|
88
91
|
def file_type(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
|
89
92
|
"""Supported file types: For example: ["png","jpg","img"]"""
|
@@ -101,7 +104,8 @@ class ChatInput(google.protobuf.message.Message):
|
|
101
104
|
position: global___ChatInput.Position.ValueType = ...,
|
102
105
|
accept_file: global___ChatInput.AcceptFile.ValueType = ...,
|
103
106
|
file_type: collections.abc.Iterable[builtins.str] | None = ...,
|
107
|
+
max_upload_size_mb: builtins.int = ...,
|
104
108
|
) -> None: ...
|
105
|
-
def ClearField(self, field_name: typing.Literal["accept_file", b"accept_file", "default", b"default", "disabled", b"disabled", "file_type", b"file_type", "id", b"id", "max_chars", b"max_chars", "placeholder", b"placeholder", "position", b"position", "set_value", b"set_value", "value", b"value"]) -> None: ...
|
109
|
+
def ClearField(self, field_name: typing.Literal["accept_file", b"accept_file", "default", b"default", "disabled", b"disabled", "file_type", b"file_type", "id", b"id", "max_chars", b"max_chars", "max_upload_size_mb", b"max_upload_size_mb", "placeholder", b"placeholder", "position", b"position", "set_value", b"set_value", "value", b"value"]) -> None: ...
|
106
110
|
|
107
111
|
global___ChatInput = ChatInput
|
@@ -15,7 +15,7 @@ _sym_db = _symbol_database.Default()
|
|
15
15
|
from streamlit.proto import WidgetStates_pb2 as streamlit_dot_proto_dot_WidgetStates__pb2
|
16
16
|
|
17
17
|
|
18
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!streamlit/proto/ClientState.proto\x1a\"streamlit/proto/WidgetStates.proto\"\
|
18
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!streamlit/proto/ClientState.proto\x1a\"streamlit/proto/WidgetStates.proto\"c\n\x0b\x43ontextInfo\x12\x15\n\x08timezone\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0ftimezone_offset\x18\x02 \x01(\x05H\x01\x88\x01\x01\x42\x0b\n\t_timezoneB\x12\n\x10_timezone_offset\"\xc6\x01\n\x0b\x43lientState\x12\x14\n\x0cquery_string\x18\x01 \x01(\t\x12$\n\rwidget_states\x18\x02 \x01(\x0b\x32\r.WidgetStates\x12\x18\n\x10page_script_hash\x18\x03 \x01(\t\x12\x11\n\tpage_name\x18\x04 \x01(\t\x12\x13\n\x0b\x66ragment_id\x18\x05 \x01(\t\x12\x15\n\ris_auto_rerun\x18\x06 \x01(\x08\x12\"\n\x0c\x63ontext_info\x18\x08 \x01(\x0b\x32\x0c.ContextInfoB0\n\x1c\x63om.snowflake.apps.streamlitB\x10\x43lientStateProtob\x06proto3')
|
19
19
|
|
20
20
|
_globals = globals()
|
21
21
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
@@ -23,6 +23,8 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'streamlit.proto.ClientState
|
|
23
23
|
if not _descriptor._USE_C_DESCRIPTORS:
|
24
24
|
_globals['DESCRIPTOR']._loaded_options = None
|
25
25
|
_globals['DESCRIPTOR']._serialized_options = b'\n\034com.snowflake.apps.streamlitB\020ClientStateProto'
|
26
|
-
_globals['
|
27
|
-
_globals['
|
26
|
+
_globals['_CONTEXTINFO']._serialized_start=73
|
27
|
+
_globals['_CONTEXTINFO']._serialized_end=172
|
28
|
+
_globals['_CLIENTSTATE']._serialized_start=175
|
29
|
+
_globals['_CLIENTSTATE']._serialized_end=373
|
28
30
|
# @@protoc_insertion_point(module_scope)
|
@@ -25,6 +25,29 @@ import typing
|
|
25
25
|
|
26
26
|
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
27
27
|
|
28
|
+
@typing.final
|
29
|
+
class ContextInfo(google.protobuf.message.Message):
|
30
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
31
|
+
|
32
|
+
TIMEZONE_FIELD_NUMBER: builtins.int
|
33
|
+
TIMEZONE_OFFSET_FIELD_NUMBER: builtins.int
|
34
|
+
timezone: builtins.str
|
35
|
+
timezone_offset: builtins.int
|
36
|
+
def __init__(
|
37
|
+
self,
|
38
|
+
*,
|
39
|
+
timezone: builtins.str | None = ...,
|
40
|
+
timezone_offset: builtins.int | None = ...,
|
41
|
+
) -> None: ...
|
42
|
+
def HasField(self, field_name: typing.Literal["_timezone", b"_timezone", "_timezone_offset", b"_timezone_offset", "timezone", b"timezone", "timezone_offset", b"timezone_offset"]) -> builtins.bool: ...
|
43
|
+
def ClearField(self, field_name: typing.Literal["_timezone", b"_timezone", "_timezone_offset", b"_timezone_offset", "timezone", b"timezone", "timezone_offset", b"timezone_offset"]) -> None: ...
|
44
|
+
@typing.overload
|
45
|
+
def WhichOneof(self, oneof_group: typing.Literal["_timezone", b"_timezone"]) -> typing.Literal["timezone"] | None: ...
|
46
|
+
@typing.overload
|
47
|
+
def WhichOneof(self, oneof_group: typing.Literal["_timezone_offset", b"_timezone_offset"]) -> typing.Literal["timezone_offset"] | None: ...
|
48
|
+
|
49
|
+
global___ContextInfo = ContextInfo
|
50
|
+
|
28
51
|
@typing.final
|
29
52
|
class ClientState(google.protobuf.message.Message):
|
30
53
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
@@ -35,6 +58,7 @@ class ClientState(google.protobuf.message.Message):
|
|
35
58
|
PAGE_NAME_FIELD_NUMBER: builtins.int
|
36
59
|
FRAGMENT_ID_FIELD_NUMBER: builtins.int
|
37
60
|
IS_AUTO_RERUN_FIELD_NUMBER: builtins.int
|
61
|
+
CONTEXT_INFO_FIELD_NUMBER: builtins.int
|
38
62
|
query_string: builtins.str
|
39
63
|
page_script_hash: builtins.str
|
40
64
|
page_name: builtins.str
|
@@ -42,6 +66,8 @@ class ClientState(google.protobuf.message.Message):
|
|
42
66
|
is_auto_rerun: builtins.bool
|
43
67
|
@property
|
44
68
|
def widget_states(self) -> streamlit.proto.WidgetStates_pb2.WidgetStates: ...
|
69
|
+
@property
|
70
|
+
def context_info(self) -> global___ContextInfo: ...
|
45
71
|
def __init__(
|
46
72
|
self,
|
47
73
|
*,
|
@@ -51,8 +77,9 @@ class ClientState(google.protobuf.message.Message):
|
|
51
77
|
page_name: builtins.str = ...,
|
52
78
|
fragment_id: builtins.str = ...,
|
53
79
|
is_auto_rerun: builtins.bool = ...,
|
80
|
+
context_info: global___ContextInfo | None = ...,
|
54
81
|
) -> None: ...
|
55
|
-
def HasField(self, field_name: typing.Literal["widget_states", b"widget_states"]) -> builtins.bool: ...
|
56
|
-
def ClearField(self, field_name: typing.Literal["fragment_id", b"fragment_id", "is_auto_rerun", b"is_auto_rerun", "page_name", b"page_name", "page_script_hash", b"page_script_hash", "query_string", b"query_string", "widget_states", b"widget_states"]) -> None: ...
|
82
|
+
def HasField(self, field_name: typing.Literal["context_info", b"context_info", "widget_states", b"widget_states"]) -> builtins.bool: ...
|
83
|
+
def ClearField(self, field_name: typing.Literal["context_info", b"context_info", "fragment_id", b"fragment_id", "is_auto_rerun", b"is_auto_rerun", "page_name", b"page_name", "page_script_hash", b"page_script_hash", "query_string", b"query_string", "widget_states", b"widget_states"]) -> None: ...
|
57
84
|
|
58
85
|
global___ClientState = ClientState
|
@@ -30,7 +30,7 @@ from streamlit.proto import SessionStatus_pb2 as streamlit_dot_proto_dot_Session
|
|
30
30
|
from streamlit.proto import AuthRedirect_pb2 as streamlit_dot_proto_dot_AuthRedirect__pb2
|
31
31
|
|
32
32
|
|
33
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n streamlit/proto/ForwardMsg.proto\x1a\x1fstreamlit/proto/AutoRerun.proto\x1a\x1cstreamlit/proto/Common.proto\x1a\x1bstreamlit/proto/Delta.proto\x1a\x1dstreamlit/proto/GitInfo.proto\x1a\x1astreamlit/proto/Logo.proto\x1a streamlit/proto/Navigation.proto\x1a streamlit/proto/NewSession.proto\x1a streamlit/proto/PageConfig.proto\x1a\x1estreamlit/proto/PageInfo.proto\x1a!streamlit/proto/PageProfile.proto\x1a\"streamlit/proto/PageNotFound.proto\x1a\"streamlit/proto/PagesChanged.proto\x1a#streamlit/proto/ParentMessage.proto\x1a\"streamlit/proto/SessionEvent.proto\x1a#streamlit/proto/SessionStatus.proto\x1a\"streamlit/proto/AuthRedirect.proto\"\
|
33
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n streamlit/proto/ForwardMsg.proto\x1a\x1fstreamlit/proto/AutoRerun.proto\x1a\x1cstreamlit/proto/Common.proto\x1a\x1bstreamlit/proto/Delta.proto\x1a\x1dstreamlit/proto/GitInfo.proto\x1a\x1astreamlit/proto/Logo.proto\x1a streamlit/proto/Navigation.proto\x1a streamlit/proto/NewSession.proto\x1a streamlit/proto/PageConfig.proto\x1a\x1estreamlit/proto/PageInfo.proto\x1a!streamlit/proto/PageProfile.proto\x1a\"streamlit/proto/PageNotFound.proto\x1a\"streamlit/proto/PagesChanged.proto\x1a#streamlit/proto/ParentMessage.proto\x1a\"streamlit/proto/SessionEvent.proto\x1a#streamlit/proto/SessionStatus.proto\x1a\"streamlit/proto/AuthRedirect.proto\"\xcb\x07\n\nForwardMsg\x12\x0c\n\x04hash\x18\x01 \x01(\t\x12%\n\x08metadata\x18\x02 \x01(\x0b\x32\x13.ForwardMsgMetadata\x12\"\n\x0bnew_session\x18\x04 \x01(\x0b\x32\x0b.NewSessionH\x00\x12\x17\n\x05\x64\x65lta\x18\x05 \x01(\x0b\x32\x06.DeltaH\x00\x12&\n\x11page_info_changed\x18\x0c \x01(\x0b\x32\t.PageInfoH\x00\x12*\n\x13page_config_changed\x18\r \x01(\x0b\x32\x0b.PageConfigH\x00\x12;\n\x0fscript_finished\x18\x06 \x01(\x0e\x32 .ForwardMsg.ScriptFinishedStatusH\x00\x12$\n\x10git_info_changed\x18\x0e \x01(\x0b\x32\x08.GitInfoH\x00\x12$\n\x0cpage_profile\x18\x12 \x01(\x0b\x32\x0c.PageProfileH\x00\x12\x30\n\x16session_status_changed\x18\t \x01(\x0b\x32\x0e.SessionStatusH\x00\x12&\n\rsession_event\x18\n \x01(\x0b\x32\r.SessionEventH\x00\x12!\n\nnavigation\x18\x17 \x01(\x0b\x32\x0b.NavigationH\x00\x12\'\n\x0epage_not_found\x18\x0f \x01(\x0b\x32\r.PageNotFoundH\x00\x12*\n\rpages_changed\x18\x10 \x01(\x0b\x32\r.PagesChangedB\x02\x18\x01H\x00\x12/\n\x12\x66ile_urls_response\x18\x13 \x01(\x0b\x32\x11.FileURLsResponseH\x00\x12 \n\nauto_rerun\x18\x15 \x01(\x0b\x32\n.AutoRerunH\x00\x12\x15\n\x04logo\x18\x16 \x01(\x0b\x32\x05.LogoH\x00\x12&\n\rauth_redirect\x18\x18 \x01(\x0b\x32\r.AuthRedirectH\x00\x12(\n\x0eparent_message\x18\x14 \x01(\x0b\x32\x0e.ParentMessageH\x00\x12\x12\n\x08ref_hash\x18\x0b \x01(\tH\x00\x12\x1d\n\x15\x64\x65\x62ug_last_backmsg_id\x18\x11 \x01(\t\"\x98\x01\n\x14ScriptFinishedStatus\x12\x19\n\x15\x46INISHED_SUCCESSFULLY\x10\x00\x12\x1f\n\x1b\x46INISHED_WITH_COMPILE_ERROR\x10\x01\x12\x1c\n\x18\x46INISHED_EARLY_FOR_RERUN\x10\x02\x12&\n\"FINISHED_FRAGMENT_RUN_SUCCESSFULLY\x10\x03\x42\x06\n\x04typeJ\x04\x08\x07\x10\x08J\x04\x08\x08\x10\t\"\x8e\x01\n\x12\x46orwardMsgMetadata\x12\x11\n\tcacheable\x18\x01 \x01(\x08\x12\x12\n\ndelta_path\x18\x02 \x03(\r\x12\x35\n\x16\x65lement_dimension_spec\x18\x03 \x01(\x0b\x32\x15.ElementDimensionSpec\x12\x1a\n\x12\x61\x63tive_script_hash\x18\x04 \x01(\t\"5\n\x14\x45lementDimensionSpec\x12\r\n\x05width\x18\x01 \x01(\r\x12\x0e\n\x06height\x18\x02 \x01(\r\"/\n\x0e\x46orwardMsgList\x12\x1d\n\x08messages\x18\x01 \x03(\x0b\x32\x0b.ForwardMsgB/\n\x1c\x63om.snowflake.apps.streamlitB\x0f\x46orwardMsgProtob\x06proto3')
|
34
34
|
|
35
35
|
_globals = globals()
|
36
36
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
@@ -38,14 +38,16 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'streamlit.proto.ForwardMsg_
|
|
38
38
|
if not _descriptor._USE_C_DESCRIPTORS:
|
39
39
|
_globals['DESCRIPTOR']._loaded_options = None
|
40
40
|
_globals['DESCRIPTOR']._serialized_options = b'\n\034com.snowflake.apps.streamlitB\017ForwardMsgProto'
|
41
|
+
_globals['_FORWARDMSG'].fields_by_name['pages_changed']._loaded_options = None
|
42
|
+
_globals['_FORWARDMSG'].fields_by_name['pages_changed']._serialized_options = b'\030\001'
|
41
43
|
_globals['_FORWARDMSG']._serialized_start=575
|
42
|
-
_globals['_FORWARDMSG']._serialized_end=
|
43
|
-
_globals['_FORWARDMSG_SCRIPTFINISHEDSTATUS']._serialized_start=
|
44
|
-
_globals['_FORWARDMSG_SCRIPTFINISHEDSTATUS']._serialized_end=
|
45
|
-
_globals['_FORWARDMSGMETADATA']._serialized_start=
|
46
|
-
_globals['_FORWARDMSGMETADATA']._serialized_end=
|
47
|
-
_globals['_ELEMENTDIMENSIONSPEC']._serialized_start=
|
48
|
-
_globals['_ELEMENTDIMENSIONSPEC']._serialized_end=
|
49
|
-
_globals['_FORWARDMSGLIST']._serialized_start=
|
50
|
-
_globals['_FORWARDMSGLIST']._serialized_end=
|
44
|
+
_globals['_FORWARDMSG']._serialized_end=1546
|
45
|
+
_globals['_FORWARDMSG_SCRIPTFINISHEDSTATUS']._serialized_start=1374
|
46
|
+
_globals['_FORWARDMSG_SCRIPTFINISHEDSTATUS']._serialized_end=1526
|
47
|
+
_globals['_FORWARDMSGMETADATA']._serialized_start=1549
|
48
|
+
_globals['_FORWARDMSGMETADATA']._serialized_end=1691
|
49
|
+
_globals['_ELEMENTDIMENSIONSPEC']._serialized_start=1693
|
50
|
+
_globals['_ELEMENTDIMENSIONSPEC']._serialized_end=1746
|
51
|
+
_globals['_FORWARDMSGLIST']._serialized_start=1748
|
52
|
+
_globals['_FORWARDMSGLIST']._serialized_end=1795
|
51
53
|
# @@protoc_insertion_point(module_scope)
|