pygpt-net 2.6.54__py3-none-any.whl → 2.6.56__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.
- pygpt_net/CHANGELOG.txt +11 -0
- pygpt_net/__init__.py +3 -3
- pygpt_net/app.py +26 -22
- pygpt_net/controller/audio/audio.py +0 -0
- pygpt_net/controller/calendar/calendar.py +0 -0
- pygpt_net/controller/calendar/note.py +0 -0
- pygpt_net/controller/chat/chat.py +0 -0
- pygpt_net/controller/chat/handler/openai_stream.py +2 -1
- pygpt_net/controller/chat/handler/worker.py +0 -0
- pygpt_net/controller/chat/remote_tools.py +0 -0
- pygpt_net/controller/chat/render.py +0 -0
- pygpt_net/controller/chat/text.py +0 -0
- pygpt_net/controller/ctx/common.py +0 -0
- pygpt_net/controller/debug/debug.py +26 -2
- pygpt_net/controller/debug/fixtures.py +1 -1
- pygpt_net/controller/dialogs/confirm.py +15 -1
- pygpt_net/controller/dialogs/debug.py +2 -0
- pygpt_net/controller/lang/mapping.py +0 -0
- pygpt_net/controller/launcher/launcher.py +0 -0
- pygpt_net/controller/mode/mode.py +0 -0
- pygpt_net/controller/presets/presets.py +0 -0
- pygpt_net/controller/realtime/realtime.py +0 -0
- pygpt_net/controller/theme/theme.py +0 -0
- pygpt_net/controller/ui/mode.py +0 -0
- pygpt_net/controller/ui/tabs.py +0 -0
- pygpt_net/core/agents/agents.py +3 -1
- pygpt_net/core/agents/custom.py +150 -0
- pygpt_net/core/agents/provider.py +0 -0
- pygpt_net/core/builder/__init__.py +12 -0
- pygpt_net/core/builder/graph.py +478 -0
- pygpt_net/core/calendar/calendar.py +0 -0
- pygpt_net/core/ctx/ctx.py +2 -1
- pygpt_net/core/ctx/output.py +0 -0
- pygpt_net/core/debug/agent.py +0 -0
- pygpt_net/core/debug/agent_builder.py +29 -0
- pygpt_net/core/debug/console/console.py +0 -0
- pygpt_net/core/debug/db.py +0 -0
- pygpt_net/core/debug/debug.py +0 -0
- pygpt_net/core/debug/events.py +0 -0
- pygpt_net/core/debug/indexes.py +0 -0
- pygpt_net/core/debug/kernel.py +0 -0
- pygpt_net/core/debug/tabs.py +0 -0
- pygpt_net/core/filesystem/filesystem.py +0 -0
- pygpt_net/core/fixtures/__init__ +0 -0
- pygpt_net/core/fixtures/stream/__init__.py +0 -0
- pygpt_net/core/fixtures/stream/generator.py +0 -0
- pygpt_net/core/models/models.py +0 -0
- pygpt_net/core/render/plain/pid.py +0 -0
- pygpt_net/core/render/plain/renderer.py +26 -4
- pygpt_net/core/render/web/body.py +46 -4
- pygpt_net/core/render/web/debug.py +0 -0
- pygpt_net/core/render/web/helpers.py +0 -0
- pygpt_net/core/render/web/pid.py +0 -0
- pygpt_net/core/render/web/renderer.py +15 -20
- pygpt_net/core/tabs/tab.py +0 -0
- pygpt_net/core/tabs/tabs.py +0 -0
- pygpt_net/core/text/utils.py +0 -0
- pygpt_net/css.qrc +0 -0
- pygpt_net/css_rc.py +0 -0
- pygpt_net/data/config/config.json +7 -7
- pygpt_net/data/config/models.json +3 -3
- pygpt_net/data/css/web-blocks.css +9 -0
- pygpt_net/data/css/web-blocks.dark.css +6 -0
- pygpt_net/data/css/web-blocks.darkest.css +6 -0
- pygpt_net/data/css/web-chatgpt.css +14 -6
- pygpt_net/data/css/web-chatgpt.dark.css +6 -0
- pygpt_net/data/css/web-chatgpt.darkest.css +6 -0
- pygpt_net/data/css/web-chatgpt.light.css +6 -0
- pygpt_net/data/css/web-chatgpt_wide.css +14 -6
- pygpt_net/data/css/web-chatgpt_wide.dark.css +6 -0
- pygpt_net/data/css/web-chatgpt_wide.darkest.css +6 -0
- pygpt_net/data/css/web-chatgpt_wide.light.css +6 -0
- pygpt_net/data/fixtures/fake_stream.txt +14 -1
- pygpt_net/data/icons/case.svg +0 -0
- pygpt_net/data/icons/chat1.svg +0 -0
- pygpt_net/data/icons/chat2.svg +0 -0
- pygpt_net/data/icons/chat3.svg +0 -0
- pygpt_net/data/icons/chat4.svg +0 -0
- pygpt_net/data/icons/fit.svg +0 -0
- pygpt_net/data/icons/note1.svg +0 -0
- pygpt_net/data/icons/note2.svg +0 -0
- pygpt_net/data/icons/note3.svg +0 -0
- pygpt_net/data/icons/stt.svg +0 -0
- pygpt_net/data/icons/translate.svg +0 -0
- pygpt_net/data/icons/tts.svg +0 -0
- pygpt_net/data/icons/url.svg +0 -0
- pygpt_net/data/icons/vision.svg +0 -0
- pygpt_net/data/icons/web_off.svg +0 -0
- pygpt_net/data/icons/web_on.svg +0 -0
- pygpt_net/data/js/app/async.js +166 -0
- pygpt_net/data/js/app/bridge.js +88 -0
- pygpt_net/data/js/app/common.js +212 -0
- pygpt_net/data/js/app/config.js +223 -0
- pygpt_net/data/js/app/custom.js +961 -0
- pygpt_net/data/js/app/data.js +84 -0
- pygpt_net/data/js/app/dom.js +322 -0
- pygpt_net/data/js/app/events.js +400 -0
- pygpt_net/data/js/app/highlight.js +542 -0
- pygpt_net/data/js/app/logger.js +305 -0
- pygpt_net/data/js/app/markdown.js +1137 -0
- pygpt_net/data/js/app/math.js +167 -0
- pygpt_net/data/js/app/nodes.js +395 -0
- pygpt_net/data/js/app/queue.js +260 -0
- pygpt_net/data/js/app/raf.js +250 -0
- pygpt_net/data/js/app/runtime.js +582 -0
- pygpt_net/data/js/app/scroll.js +433 -0
- pygpt_net/data/js/app/stream.js +2708 -0
- pygpt_net/data/js/app/template.js +287 -0
- pygpt_net/data/js/app/tool.js +87 -0
- pygpt_net/data/js/app/ui.js +86 -0
- pygpt_net/data/js/app/user.js +380 -0
- pygpt_net/data/js/app/utils.js +64 -0
- pygpt_net/data/js/app.min.js +880 -0
- pygpt_net/data/js/markdown-it/markdown-it-katex.min.js +1 -1
- pygpt_net/data/js/markdown-it/markdown-it.min.js +0 -0
- pygpt_net/data/locale/locale.de.ini +0 -0
- pygpt_net/data/locale/locale.en.ini +7 -0
- pygpt_net/data/locale/locale.es.ini +0 -0
- pygpt_net/data/locale/locale.fr.ini +0 -0
- pygpt_net/data/locale/locale.it.ini +0 -0
- pygpt_net/data/locale/locale.pl.ini +0 -0
- pygpt_net/data/locale/locale.uk.ini +0 -0
- pygpt_net/data/locale/locale.zh.ini +0 -0
- pygpt_net/data/locale/plugin.agent.de.ini +0 -0
- pygpt_net/data/locale/plugin.agent.en.ini +0 -0
- pygpt_net/data/locale/plugin.agent.es.ini +0 -0
- pygpt_net/data/locale/plugin.agent.fr.ini +0 -0
- pygpt_net/data/locale/plugin.agent.it.ini +0 -0
- pygpt_net/data/locale/plugin.agent.pl.ini +0 -0
- pygpt_net/data/locale/plugin.agent.uk.ini +0 -0
- pygpt_net/data/locale/plugin.agent.zh.ini +0 -0
- pygpt_net/data/locale/plugin.audio_input.de.ini +0 -0
- pygpt_net/data/locale/plugin.audio_input.en.ini +0 -0
- pygpt_net/data/locale/plugin.audio_input.es.ini +0 -0
- pygpt_net/data/locale/plugin.audio_input.fr.ini +0 -0
- pygpt_net/data/locale/plugin.audio_input.it.ini +0 -0
- pygpt_net/data/locale/plugin.audio_input.pl.ini +0 -0
- pygpt_net/data/locale/plugin.audio_input.uk.ini +0 -0
- pygpt_net/data/locale/plugin.audio_input.zh.ini +0 -0
- pygpt_net/data/locale/plugin.audio_output.de.ini +0 -0
- pygpt_net/data/locale/plugin.audio_output.en.ini +0 -0
- pygpt_net/data/locale/plugin.audio_output.es.ini +0 -0
- pygpt_net/data/locale/plugin.audio_output.fr.ini +0 -0
- pygpt_net/data/locale/plugin.audio_output.it.ini +0 -0
- pygpt_net/data/locale/plugin.audio_output.pl.ini +0 -0
- pygpt_net/data/locale/plugin.audio_output.uk.ini +0 -0
- pygpt_net/data/locale/plugin.audio_output.zh.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_api.de.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_api.en.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_api.es.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_api.fr.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_api.it.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_api.pl.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_api.uk.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_api.zh.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_code_interpreter.de.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_code_interpreter.en.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_code_interpreter.es.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_code_interpreter.fr.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_code_interpreter.it.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_code_interpreter.pl.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_code_interpreter.uk.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_code_interpreter.zh.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_custom.de.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_custom.en.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_custom.es.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_custom.fr.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_custom.it.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_custom.pl.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_custom.uk.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_custom.zh.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_files.de.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_files.en.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_files.es.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_files.fr.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_files.it.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_files.pl.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_files.uk.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_files.zh.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_history.de.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_history.en.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_history.es.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_history.fr.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_history.it.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_history.pl.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_history.uk.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_history.zh.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_mouse_control.de.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_mouse_control.en.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_mouse_control.es.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_mouse_control.fr.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_mouse_control.it.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_mouse_control.pl.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_mouse_control.uk.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_mouse_control.zh.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_serial.de.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_serial.en.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_serial.es.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_serial.fr.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_serial.it.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_serial.pl.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_serial.uk.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_serial.zh.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_system.de.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_system.en.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_system.es.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_system.fr.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_system.it.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_system.pl.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_system.uk.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_system.zh.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_web.de.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_web.en.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_web.es.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_web.fr.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_web.it.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_web.pl.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_web.uk.ini +0 -0
- pygpt_net/data/locale/plugin.cmd_web.zh.ini +0 -0
- pygpt_net/data/locale/plugin.crontab.de.ini +0 -0
- pygpt_net/data/locale/plugin.crontab.en.ini +0 -0
- pygpt_net/data/locale/plugin.crontab.es.ini +0 -0
- pygpt_net/data/locale/plugin.crontab.fr.ini +0 -0
- pygpt_net/data/locale/plugin.crontab.it.ini +0 -0
- pygpt_net/data/locale/plugin.crontab.pl.ini +0 -0
- pygpt_net/data/locale/plugin.crontab.uk.ini +0 -0
- pygpt_net/data/locale/plugin.crontab.zh.ini +0 -0
- pygpt_net/data/locale/plugin.experts.de.ini +0 -0
- pygpt_net/data/locale/plugin.experts.en.ini +0 -0
- pygpt_net/data/locale/plugin.experts.es.ini +0 -0
- pygpt_net/data/locale/plugin.experts.fr.ini +0 -0
- pygpt_net/data/locale/plugin.experts.it.ini +0 -0
- pygpt_net/data/locale/plugin.experts.pl.ini +0 -0
- pygpt_net/data/locale/plugin.experts.uk.ini +0 -0
- pygpt_net/data/locale/plugin.experts.zh.ini +0 -0
- pygpt_net/data/locale/plugin.extra_prompt.de.ini +0 -0
- pygpt_net/data/locale/plugin.extra_prompt.en.ini +0 -0
- pygpt_net/data/locale/plugin.extra_prompt.es.ini +0 -0
- pygpt_net/data/locale/plugin.extra_prompt.fr.ini +0 -0
- pygpt_net/data/locale/plugin.extra_prompt.it.ini +0 -0
- pygpt_net/data/locale/plugin.extra_prompt.pl.ini +0 -0
- pygpt_net/data/locale/plugin.extra_prompt.uk.ini +0 -0
- pygpt_net/data/locale/plugin.extra_prompt.zh.ini +0 -0
- pygpt_net/data/locale/plugin.idx_llama_index.de.ini +0 -0
- pygpt_net/data/locale/plugin.idx_llama_index.en.ini +0 -0
- pygpt_net/data/locale/plugin.idx_llama_index.es.ini +0 -0
- pygpt_net/data/locale/plugin.idx_llama_index.fr.ini +0 -0
- pygpt_net/data/locale/plugin.idx_llama_index.it.ini +0 -0
- pygpt_net/data/locale/plugin.idx_llama_index.pl.ini +0 -0
- pygpt_net/data/locale/plugin.idx_llama_index.uk.ini +0 -0
- pygpt_net/data/locale/plugin.idx_llama_index.zh.ini +0 -0
- pygpt_net/data/locale/plugin.mailer.en.ini +0 -0
- pygpt_net/data/locale/plugin.mcp.en.ini +0 -0
- pygpt_net/data/locale/plugin.openai_dalle.de.ini +0 -0
- pygpt_net/data/locale/plugin.openai_dalle.en.ini +0 -0
- pygpt_net/data/locale/plugin.openai_dalle.es.ini +0 -0
- pygpt_net/data/locale/plugin.openai_dalle.fr.ini +0 -0
- pygpt_net/data/locale/plugin.openai_dalle.it.ini +0 -0
- pygpt_net/data/locale/plugin.openai_dalle.pl.ini +0 -0
- pygpt_net/data/locale/plugin.openai_dalle.uk.ini +0 -0
- pygpt_net/data/locale/plugin.openai_dalle.zh.ini +0 -0
- pygpt_net/data/locale/plugin.openai_vision.de.ini +0 -0
- pygpt_net/data/locale/plugin.openai_vision.en.ini +0 -0
- pygpt_net/data/locale/plugin.openai_vision.es.ini +0 -0
- pygpt_net/data/locale/plugin.openai_vision.fr.ini +0 -0
- pygpt_net/data/locale/plugin.openai_vision.it.ini +0 -0
- pygpt_net/data/locale/plugin.openai_vision.pl.ini +0 -0
- pygpt_net/data/locale/plugin.openai_vision.uk.ini +0 -0
- pygpt_net/data/locale/plugin.openai_vision.zh.ini +0 -0
- pygpt_net/data/locale/plugin.osm.en.ini +0 -0
- pygpt_net/data/locale/plugin.real_time.de.ini +0 -0
- pygpt_net/data/locale/plugin.real_time.en.ini +0 -0
- pygpt_net/data/locale/plugin.real_time.es.ini +0 -0
- pygpt_net/data/locale/plugin.real_time.fr.ini +0 -0
- pygpt_net/data/locale/plugin.real_time.it.ini +0 -0
- pygpt_net/data/locale/plugin.real_time.pl.ini +0 -0
- pygpt_net/data/locale/plugin.real_time.uk.ini +0 -0
- pygpt_net/data/locale/plugin.real_time.zh.ini +0 -0
- pygpt_net/data/locale/plugin.voice_control.de.ini +0 -0
- pygpt_net/data/locale/plugin.voice_control.en.ini +0 -0
- pygpt_net/data/locale/plugin.voice_control.es.ini +0 -0
- pygpt_net/data/locale/plugin.voice_control.fr.ini +0 -0
- pygpt_net/data/locale/plugin.voice_control.it.ini +0 -0
- pygpt_net/data/locale/plugin.voice_control.pl.ini +0 -0
- pygpt_net/data/locale/plugin.voice_control.uk.ini +0 -0
- pygpt_net/data/locale/plugin.voice_control.zh.ini +0 -0
- pygpt_net/data/locale/plugin.wolfram.en.ini +0 -0
- pygpt_net/fonts.qrc +0 -0
- pygpt_net/fonts_rc.py +0 -0
- pygpt_net/icons.qrc +0 -0
- pygpt_net/icons_rc.py +0 -0
- pygpt_net/item/agent.py +62 -0
- pygpt_net/item/builder_layout.py +62 -0
- pygpt_net/js.qrc +24 -1
- pygpt_net/js_rc.py +51394 -33687
- pygpt_net/plugin/base/worker.py +0 -0
- pygpt_net/plugin/mcp/__init__.py +0 -0
- pygpt_net/plugin/mcp/config.py +0 -0
- pygpt_net/plugin/mcp/plugin.py +0 -0
- pygpt_net/plugin/mcp/worker.py +0 -0
- pygpt_net/plugin/osm/__init__.py +0 -0
- pygpt_net/plugin/osm/config.py +0 -0
- pygpt_net/plugin/osm/plugin.py +0 -0
- pygpt_net/plugin/osm/worker.py +0 -0
- pygpt_net/plugin/wolfram/__init__.py +0 -0
- pygpt_net/plugin/wolfram/config.py +0 -0
- pygpt_net/plugin/wolfram/plugin.py +0 -0
- pygpt_net/plugin/wolfram/worker.py +0 -0
- pygpt_net/provider/api/anthropic/tools.py +0 -0
- pygpt_net/provider/api/google/__init__.py +0 -0
- pygpt_net/provider/api/google/video.py +0 -0
- pygpt_net/provider/api/openai/agents/experts.py +0 -0
- pygpt_net/provider/api/openai/agents/remote_tools.py +0 -0
- pygpt_net/provider/api/openai/remote_tools.py +0 -0
- pygpt_net/provider/api/openai/responses.py +0 -0
- pygpt_net/provider/api/x_ai/__init__.py +0 -0
- pygpt_net/provider/api/x_ai/remote.py +0 -0
- pygpt_net/provider/core/agent/__init__.py +10 -0
- pygpt_net/provider/core/agent/base.py +51 -0
- pygpt_net/provider/core/agent/json_file.py +200 -0
- pygpt_net/provider/core/config/patch.py +18 -0
- pygpt_net/provider/core/config/patches/__init__.py +0 -0
- pygpt_net/provider/core/config/patches/patch_before_2_6_42.py +0 -0
- pygpt_net/provider/core/ctx/db_sqlite/storage.py +0 -0
- pygpt_net/provider/core/model/patches/__init__.py +0 -0
- pygpt_net/provider/core/model/patches/patch_before_2_6_42.py +0 -0
- pygpt_net/provider/core/preset/patch.py +0 -0
- pygpt_net/provider/core/preset/patches/__init__.py +0 -0
- pygpt_net/provider/core/preset/patches/patch_before_2_6_42.py +0 -0
- pygpt_net/provider/llms/base.py +0 -0
- pygpt_net/provider/llms/deepseek_api.py +0 -0
- pygpt_net/provider/llms/google.py +0 -0
- pygpt_net/provider/llms/hugging_face_api.py +0 -0
- pygpt_net/provider/llms/hugging_face_embedding.py +0 -0
- pygpt_net/provider/llms/hugging_face_router.py +0 -0
- pygpt_net/provider/llms/local.py +0 -0
- pygpt_net/provider/llms/mistral.py +0 -0
- pygpt_net/provider/llms/open_router.py +0 -0
- pygpt_net/provider/llms/perplexity.py +0 -0
- pygpt_net/provider/llms/utils.py +0 -0
- pygpt_net/provider/llms/voyage.py +0 -0
- pygpt_net/provider/llms/x_ai.py +0 -0
- pygpt_net/tools/agent_builder/__init__.py +12 -0
- pygpt_net/tools/agent_builder/tool.py +292 -0
- pygpt_net/tools/agent_builder/ui/__init__.py +0 -0
- pygpt_net/tools/agent_builder/ui/dialogs.py +152 -0
- pygpt_net/tools/agent_builder/ui/list.py +228 -0
- pygpt_net/tools/code_interpreter/ui/html.py +0 -0
- pygpt_net/tools/code_interpreter/ui/widgets.py +0 -0
- pygpt_net/tools/html_canvas/tool.py +23 -6
- pygpt_net/tools/html_canvas/ui/widgets.py +224 -2
- pygpt_net/ui/layout/chat/chat.py +0 -0
- pygpt_net/ui/main.py +10 -9
- pygpt_net/ui/menu/debug.py +39 -1
- pygpt_net/ui/widget/builder/__init__.py +12 -0
- pygpt_net/ui/widget/builder/editor.py +2001 -0
- pygpt_net/ui/widget/draw/painter.py +0 -0
- pygpt_net/ui/widget/element/labels.py +9 -4
- pygpt_net/ui/widget/lists/db.py +0 -0
- pygpt_net/ui/widget/lists/debug.py +0 -0
- pygpt_net/ui/widget/tabs/body.py +0 -0
- pygpt_net/ui/widget/textarea/input.py +17 -8
- pygpt_net/ui/widget/textarea/output.py +21 -1
- pygpt_net/ui/widget/textarea/web.py +29 -2
- pygpt_net/utils.py +40 -0
- {pygpt_net-2.6.54.dist-info → pygpt_net-2.6.56.dist-info}/METADATA +13 -2
- {pygpt_net-2.6.54.dist-info → pygpt_net-2.6.56.dist-info}/RECORD +86 -47
- pygpt_net/data/js/app.js +0 -5869
- {pygpt_net-2.6.54.dist-info → pygpt_net-2.6.56.dist-info}/LICENSE +0 -0
- {pygpt_net-2.6.54.dist-info → pygpt_net-2.6.56.dist-info}/WHEEL +0 -0
- {pygpt_net-2.6.54.dist-info → pygpt_net-2.6.56.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
// ==========================================================================
|
|
2
|
+
// Event manager
|
|
3
|
+
// ==========================================================================
|
|
4
|
+
|
|
5
|
+
class EventManager {
|
|
6
|
+
|
|
7
|
+
// Initializes the event manager.
|
|
8
|
+
constructor(cfg, dom, scrollMgr, highlighter, codeScroll, toolOutput, bridge) {
|
|
9
|
+
this.cfg = cfg;
|
|
10
|
+
this.dom = dom;
|
|
11
|
+
this.scrollMgr = scrollMgr;
|
|
12
|
+
this.highlighter = highlighter;
|
|
13
|
+
this.codeScroll = codeScroll;
|
|
14
|
+
this.toolOutput = toolOutput;
|
|
15
|
+
this.bridge = bridge;
|
|
16
|
+
this.handlers = {
|
|
17
|
+
wheel: null,
|
|
18
|
+
scroll: null,
|
|
19
|
+
resize: null,
|
|
20
|
+
fabClick: null,
|
|
21
|
+
mouseover: null,
|
|
22
|
+
mouseout: null,
|
|
23
|
+
click: null,
|
|
24
|
+
keydown: null,
|
|
25
|
+
docClickFocus: null,
|
|
26
|
+
visibility: null,
|
|
27
|
+
focus: null,
|
|
28
|
+
pageshow: null
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Finds the closest code wrapper element.
|
|
33
|
+
_findWrapper(target) {
|
|
34
|
+
if (!target || typeof target.closest !== 'function') return null;
|
|
35
|
+
return target.closest('.code-wrapper');
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Gets the code element inside a wrapper.
|
|
39
|
+
_getCodeEl(wrapper) {
|
|
40
|
+
if (!wrapper) return null;
|
|
41
|
+
return wrapper.querySelector('pre > code');
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Collects the text content from a code element.
|
|
45
|
+
_collectCodeText(codeEl) {
|
|
46
|
+
if (!codeEl) return '';
|
|
47
|
+
const frozen = codeEl.querySelector('.hl-frozen');
|
|
48
|
+
const tail = codeEl.querySelector('.hl-tail');
|
|
49
|
+
if (frozen || tail) return (frozen?.textContent || '') + (tail?.textContent || '');
|
|
50
|
+
return codeEl.textContent || '';
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Collect plain text from a user message, ignoring helper UI (ellipsis/toggle/icon).
|
|
54
|
+
_collectUserText(msgBox) {
|
|
55
|
+
if (!msgBox) return '';
|
|
56
|
+
const msg = msgBox.querySelector('.msg');
|
|
57
|
+
if (!msg) return '';
|
|
58
|
+
// Prefer the content container if present.
|
|
59
|
+
const root = msg.querySelector('.uc-content') || msg;
|
|
60
|
+
|
|
61
|
+
let out = '';
|
|
62
|
+
const walker = document.createTreeWalker(
|
|
63
|
+
root,
|
|
64
|
+
NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_TEXT,
|
|
65
|
+
{
|
|
66
|
+
acceptNode: (node) => {
|
|
67
|
+
if (node.nodeType === Node.ELEMENT_NODE) {
|
|
68
|
+
const el = node;
|
|
69
|
+
// Skip helper UI and prune subtree.
|
|
70
|
+
if (el.matches('.uc-ellipsis,[data-copy-ignore="1"],.msg-copy-btn,.uc-toggle')) {
|
|
71
|
+
return NodeFilter.FILTER_REJECT;
|
|
72
|
+
}
|
|
73
|
+
// Convert <br> into newlines.
|
|
74
|
+
if (el.tagName === 'BR') {
|
|
75
|
+
out += '\n';
|
|
76
|
+
return NodeFilter.FILTER_SKIP;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
80
|
+
return NodeFilter.FILTER_ACCEPT;
|
|
81
|
+
}
|
|
82
|
+
return NodeFilter.FILTER_SKIP;
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
false
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
let n;
|
|
89
|
+
while ((n = walker.nextNode())) {
|
|
90
|
+
out += n.nodeValue;
|
|
91
|
+
}
|
|
92
|
+
return String(out || '').replace(/\r\n?/g, '\n');
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Copy to clipboard via bridge if available, otherwise use browser APIs.
|
|
96
|
+
async _copyTextRobust(text) {
|
|
97
|
+
try {
|
|
98
|
+
if (this.bridge && typeof this.bridge.copyCode === 'function') {
|
|
99
|
+
this.bridge.copyCode(text);
|
|
100
|
+
return true;
|
|
101
|
+
}
|
|
102
|
+
} catch (_) {}
|
|
103
|
+
try {
|
|
104
|
+
if (navigator && navigator.clipboard && navigator.clipboard.writeText) {
|
|
105
|
+
await navigator.clipboard.writeText(text);
|
|
106
|
+
return true;
|
|
107
|
+
}
|
|
108
|
+
} catch (_) {}
|
|
109
|
+
try {
|
|
110
|
+
const ta = document.createElement('textarea');
|
|
111
|
+
ta.value = text;
|
|
112
|
+
ta.setAttribute('readonly', '');
|
|
113
|
+
ta.style.position = 'fixed';
|
|
114
|
+
ta.style.top = '-9999px';
|
|
115
|
+
ta.style.opacity = '0';
|
|
116
|
+
document.body.appendChild(ta);
|
|
117
|
+
ta.select();
|
|
118
|
+
const ok = document.execCommand && document.execCommand('copy');
|
|
119
|
+
document.body.removeChild(ta);
|
|
120
|
+
return !!ok;
|
|
121
|
+
} catch (_) {
|
|
122
|
+
return false;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// Flash "Copied" feedback on the copy button.
|
|
127
|
+
_flashCopied(btn, wrapper) {
|
|
128
|
+
if (!btn) return;
|
|
129
|
+
const DUR = 1200;
|
|
130
|
+
|
|
131
|
+
// Try to find an icon to swap (works for both code-header and msg copy buttons)
|
|
132
|
+
const img = btn.querySelector('img.copy-img') || btn.querySelector('img.action-img') || btn.querySelector('img');
|
|
133
|
+
|
|
134
|
+
// Clear pending timers to avoid races on rapid clicks
|
|
135
|
+
try { if (btn.__copyTimer) { clearTimeout(btn.__copyTimer); btn.__copyTimer = 0; } } catch (_) {}
|
|
136
|
+
try { if (btn.__iconTimer) { clearTimeout(btn.__iconTimer); btn.__iconTimer = 0; } } catch (_) {}
|
|
137
|
+
|
|
138
|
+
// Icon swap to success (window.ICON_DONE), then restore
|
|
139
|
+
if (typeof window !== 'undefined' && window.ICON_DONE && img) {
|
|
140
|
+
// Cache original icon once
|
|
141
|
+
if (!btn.__origIconSrc) {
|
|
142
|
+
try { btn.__origIconSrc = img.getAttribute('src') || ''; } catch (_) { btn.__origIconSrc = ''; }
|
|
143
|
+
}
|
|
144
|
+
try { img.setAttribute('src', String(window.ICON_DONE)); } catch (_) {}
|
|
145
|
+
btn.__iconTimer = setTimeout(() => {
|
|
146
|
+
try {
|
|
147
|
+
const orig = btn.__origIconSrc || '';
|
|
148
|
+
if (orig) img.setAttribute('src', orig);
|
|
149
|
+
} catch (_) {}
|
|
150
|
+
btn.__iconTimer = 0;
|
|
151
|
+
}, DUR);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
const span = btn.querySelector('span');
|
|
155
|
+
// Icon-only fallback (no label)
|
|
156
|
+
if (!span) {
|
|
157
|
+
btn.classList.add('copied');
|
|
158
|
+
btn.__copyTimer = setTimeout(() => {
|
|
159
|
+
try { btn.classList.remove('copied'); } catch (_) {}
|
|
160
|
+
btn.__copyTimer = 0;
|
|
161
|
+
}, DUR);
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
const L_COPY = (wrapper && wrapper.getAttribute('data-locale-copy')) || 'Copy';
|
|
166
|
+
const L_COPIED = (wrapper && wrapper.getAttribute('data-locale-copied')) || 'Copied';
|
|
167
|
+
span.textContent = L_COPIED;
|
|
168
|
+
btn.classList.add('copied');
|
|
169
|
+
btn.__copyTimer = setTimeout(() => {
|
|
170
|
+
try {
|
|
171
|
+
span.textContent = L_COPY;
|
|
172
|
+
btn.classList.remove('copied');
|
|
173
|
+
} catch (_) {}
|
|
174
|
+
btn.__copyTimer = 0;
|
|
175
|
+
}, DUR);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// Toggle code collapse/expand and remember collapsed indices.
|
|
179
|
+
_toggleCollapse(wrapper) {
|
|
180
|
+
if (!wrapper) return;
|
|
181
|
+
const codeEl = this._getCodeEl(wrapper);
|
|
182
|
+
if (!codeEl) return;
|
|
183
|
+
const btn = wrapper.querySelector('.code-header-collapse');
|
|
184
|
+
const span = btn ? btn.querySelector('span') : null;
|
|
185
|
+
const L_COLLAPSE = wrapper.getAttribute('data-locale-collapse') || 'Collapse';
|
|
186
|
+
const L_EXPAND = wrapper.getAttribute('data-locale-expand') || 'Expand';
|
|
187
|
+
const idx = String(wrapper.getAttribute('data-index') || '');
|
|
188
|
+
const arr = window.__collapsed_idx || (window.__collapsed_idx = []);
|
|
189
|
+
const isHidden = (codeEl.style.display === 'none');
|
|
190
|
+
|
|
191
|
+
if (isHidden) {
|
|
192
|
+
codeEl.style.display = 'block';
|
|
193
|
+
if (span) span.textContent = L_COLLAPSE;
|
|
194
|
+
const p = arr.indexOf(idx);
|
|
195
|
+
if (p !== -1) arr.splice(p, 1);
|
|
196
|
+
if (btn) btn.setAttribute('title', L_COLLAPSE);
|
|
197
|
+
} else {
|
|
198
|
+
codeEl.style.display = 'none';
|
|
199
|
+
if (span) span.textContent = L_EXPAND;
|
|
200
|
+
if (!arr.includes(idx)) arr.push(idx);
|
|
201
|
+
if (btn) btn.setAttribute('title', L_EXPAND);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
// Click feedback (same "pop" effect as input)
|
|
205
|
+
if (btn) {
|
|
206
|
+
try { if (btn.__popTimer) { clearTimeout(btn.__popTimer); btn.__popTimer = 0; } } catch (_) {}
|
|
207
|
+
btn.classList.add('copied');
|
|
208
|
+
btn.__popTimer = setTimeout(() => {
|
|
209
|
+
try { btn.classList.remove('copied'); } catch (_) {}
|
|
210
|
+
btn.__popTimer = 0;
|
|
211
|
+
}, 1200);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
// Attach global UI event handlers and container-level interactions.
|
|
216
|
+
install() {
|
|
217
|
+
try {
|
|
218
|
+
history.scrollRestoration = "manual";
|
|
219
|
+
} catch (_) {}
|
|
220
|
+
|
|
221
|
+
this.handlers.keydown = (event) => {
|
|
222
|
+
if (event.ctrlKey && event.key === 'f') {
|
|
223
|
+
window.location.href = 'bridge://open_find:' + runtime.cfg.PID;
|
|
224
|
+
event.preventDefault();
|
|
225
|
+
}
|
|
226
|
+
if (event.key === 'Escape') {
|
|
227
|
+
window.location.href = 'bridge://escape';
|
|
228
|
+
event.preventDefault();
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
document.addEventListener('keydown', this.handlers.keydown, { passive: false });
|
|
232
|
+
|
|
233
|
+
// Removed global click-to-focus navigation and visibility/focus wakeups to keep the pump rAF-only and click-agnostic.
|
|
234
|
+
|
|
235
|
+
const container = this.dom.get('container');
|
|
236
|
+
const inputArea = this.dom.get('_append_input_');
|
|
237
|
+
|
|
238
|
+
const addClassToMsg = (id, className) => {
|
|
239
|
+
const el = document.getElementById('msg-bot-' + id);
|
|
240
|
+
if (el) el.classList.add(className);
|
|
241
|
+
};
|
|
242
|
+
const removeClassFromMsg = (id, className) => {
|
|
243
|
+
const el = document.getElementById('msg-bot-' + id);
|
|
244
|
+
if (el) el.classList.remove(className);
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
this.handlers.mouseover = (event) => {
|
|
248
|
+
if (event.target.classList.contains('action-img')) {
|
|
249
|
+
const id = event.target.getAttribute('data-id');
|
|
250
|
+
addClassToMsg(id, 'msg-highlight');
|
|
251
|
+
}
|
|
252
|
+
};
|
|
253
|
+
this.handlers.mouseout = (event) => {
|
|
254
|
+
if (event.target.classList.contains('action-img')) {
|
|
255
|
+
const id = event.target.getAttribute('data-id');
|
|
256
|
+
const el = document.getElementById('msg-bot-' + id);
|
|
257
|
+
if (el) el.classList.remove('msg-highlight');
|
|
258
|
+
}
|
|
259
|
+
};
|
|
260
|
+
if (container) {
|
|
261
|
+
container.addEventListener('mouseover', this.handlers.mouseover, { passive: true });
|
|
262
|
+
container.addEventListener('mouseout', this.handlers.mouseout, { passive: true });
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
this.handlers.click = async (ev) => {
|
|
266
|
+
// Code block header actions
|
|
267
|
+
const aCode = ev.target && (ev.target.closest ? ev.target.closest('a.code-header-action') : null) || null;
|
|
268
|
+
// User message copy action
|
|
269
|
+
const aUserCopy = ev.target && (ev.target.closest ? ev.target.closest('a.msg-copy-btn') : null) || null;
|
|
270
|
+
|
|
271
|
+
if (!aCode && !aUserCopy) return;
|
|
272
|
+
|
|
273
|
+
ev.preventDefault();
|
|
274
|
+
ev.stopPropagation();
|
|
275
|
+
|
|
276
|
+
// Handle code header actions first (unchanged behavior)
|
|
277
|
+
if (aCode) {
|
|
278
|
+
const wrapper = this._findWrapper(aCode);
|
|
279
|
+
if (!wrapper) return;
|
|
280
|
+
|
|
281
|
+
const isCopy = aCode.classList.contains('code-header-copy');
|
|
282
|
+
const isCollapse = aCode.classList.contains('code-header-collapse');
|
|
283
|
+
const isRun = aCode.classList.contains('code-header-run');
|
|
284
|
+
const isPreview = aCode.classList.contains('code-header-preview');
|
|
285
|
+
|
|
286
|
+
let codeEl = null, text = '';
|
|
287
|
+
if (isCopy || isRun || isPreview) {
|
|
288
|
+
codeEl = this._getCodeEl(wrapper);
|
|
289
|
+
text = this._collectCodeText(codeEl);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
try {
|
|
293
|
+
if (isCopy) {
|
|
294
|
+
const ok = await this._copyTextRobust(text);
|
|
295
|
+
if (ok) this._flashCopied(aCode, wrapper);
|
|
296
|
+
} else if (isCollapse) {
|
|
297
|
+
this._toggleCollapse(wrapper);
|
|
298
|
+
} else if (isRun) {
|
|
299
|
+
if (this.bridge && typeof this.bridge.runCode === 'function') this.bridge.runCode(text);
|
|
300
|
+
} else if (isPreview) {
|
|
301
|
+
if (this.bridge && typeof this.bridge.previewCode === 'function') this.bridge.previewCode(text);
|
|
302
|
+
}
|
|
303
|
+
} catch (_) {
|
|
304
|
+
/* swallow */
|
|
305
|
+
}
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
// Handle user message copy button (icon-only)
|
|
310
|
+
if (aUserCopy) {
|
|
311
|
+
try {
|
|
312
|
+
const msgBox = aUserCopy.closest('.msg-box.msg-user');
|
|
313
|
+
const text = this._collectUserText(msgBox);
|
|
314
|
+
const ok = await this._copyTextRobust(text);
|
|
315
|
+
|
|
316
|
+
// Localized tooltip swap and visual feedback
|
|
317
|
+
const L = (this.cfg && this.cfg.LOCALE) || {};
|
|
318
|
+
const L_COPY = L.COPY || 'Copy';
|
|
319
|
+
const L_COPIED = L.COPIED || 'Copied';
|
|
320
|
+
|
|
321
|
+
// Visual feedback only (no tooltip) + temporary icon swap handled centrally
|
|
322
|
+
if (ok) {
|
|
323
|
+
this._flashCopied(aUserCopy, null);
|
|
324
|
+
}
|
|
325
|
+
} catch (_) {
|
|
326
|
+
/* swallow */
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
};
|
|
330
|
+
|
|
331
|
+
// Delegate clicks from both main container and input area to support copy icons everywhere.
|
|
332
|
+
if (container) container.addEventListener('click', this.handlers.click, { passive: false });
|
|
333
|
+
if (inputArea) inputArea.addEventListener('click', this.handlers.click, { passive: false });
|
|
334
|
+
|
|
335
|
+
this.handlers.wheel = (ev) => {
|
|
336
|
+
runtime.scrollMgr.userInteracted = true;
|
|
337
|
+
if (ev.deltaY < 0) runtime.scrollMgr.autoFollow = false;
|
|
338
|
+
else runtime.scrollMgr.maybeEnableAutoFollowByProximity();
|
|
339
|
+
this.highlighter.scheduleScanVisibleCodes(runtime.stream.activeCode);
|
|
340
|
+
};
|
|
341
|
+
document.addEventListener('wheel', this.handlers.wheel, { passive: true });
|
|
342
|
+
|
|
343
|
+
this.handlers.scroll = () => {
|
|
344
|
+
const el = Utils.SE;
|
|
345
|
+
const top = el.scrollTop;
|
|
346
|
+
if (top + 1 < runtime.scrollMgr.lastScrollTop) runtime.scrollMgr.autoFollow = false;
|
|
347
|
+
runtime.scrollMgr.maybeEnableAutoFollowByProximity();
|
|
348
|
+
runtime.scrollMgr.lastScrollTop = top;
|
|
349
|
+
const action = runtime.scrollMgr.computeFabAction();
|
|
350
|
+
if (action !== runtime.scrollMgr.currentFabAction) runtime.scrollMgr.updateScrollFab(false, action, true);
|
|
351
|
+
this.highlighter.scheduleScanVisibleCodes(runtime.stream.activeCode);
|
|
352
|
+
};
|
|
353
|
+
window.addEventListener('scroll', this.handlers.scroll, { passive: true });
|
|
354
|
+
|
|
355
|
+
const fab = this.dom.get('scrollFab');
|
|
356
|
+
if (fab) {
|
|
357
|
+
this.handlers.fabClick = (ev) => {
|
|
358
|
+
ev.preventDefault();
|
|
359
|
+
ev.stopPropagation();
|
|
360
|
+
const action = runtime.scrollMgr.computeFabAction();
|
|
361
|
+
if (action === 'up') runtime.scrollMgr.scrollToTopUser();
|
|
362
|
+
else if (action === 'down') runtime.scrollMgr.scrollToBottomUser();
|
|
363
|
+
runtime.scrollMgr.fabFreezeUntil = Utils.now() + this.cfg.FAB.TOGGLE_DEBOUNCE_MS;
|
|
364
|
+
runtime.scrollMgr.updateScrollFab(true);
|
|
365
|
+
};
|
|
366
|
+
fab.addEventListener('click', this.handlers.fabClick, { passive: false });
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
this.handlers.resize = () => {
|
|
370
|
+
runtime.scrollMgr.maybeEnableAutoFollowByProximity();
|
|
371
|
+
runtime.scrollMgr.scheduleScrollFabUpdate();
|
|
372
|
+
this.highlighter.scheduleScanVisibleCodes(runtime.stream.activeCode);
|
|
373
|
+
};
|
|
374
|
+
window.addEventListener('resize', this.handlers.resize, { passive: true });
|
|
375
|
+
|
|
376
|
+
// Note: visibility/focus/pageshow kickers removed intentionally.
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
// Detach all installed handlers and reset local refs.
|
|
380
|
+
cleanup() {
|
|
381
|
+
const container = this.dom.get('container');
|
|
382
|
+
const inputArea = this.dom.get('_append_input_');
|
|
383
|
+
|
|
384
|
+
if (this.handlers.wheel) document.removeEventListener('wheel', this.handlers.wheel);
|
|
385
|
+
if (this.handlers.scroll) window.removeEventListener('scroll', this.handlers.scroll);
|
|
386
|
+
if (this.handlers.resize) window.removeEventListener('resize', this.handlers.resize);
|
|
387
|
+
const fab = this.dom.get('scrollFab');
|
|
388
|
+
if (fab && this.handlers.fabClick) fab.removeEventListener('click', this.handlers.fabClick);
|
|
389
|
+
if (container && this.handlers.mouseover) container.removeEventListener('mouseover', this.handlers.mouseover);
|
|
390
|
+
if (container && this.handlers.mouseout) container.removeEventListener('mouseout', this.handlers.mouseout);
|
|
391
|
+
if (container && this.handlers.click) container.removeEventListener('click', this.handlers.click);
|
|
392
|
+
if (inputArea && this.handlers.click) inputArea.removeEventListener('click', this.handlers.click);
|
|
393
|
+
if (this.handlers.keydown) document.removeEventListener('keydown', this.handlers.keydown);
|
|
394
|
+
if (this.handlers.docClickFocus) document.removeEventListener('click', this.handlers.docClickFocus);
|
|
395
|
+
if (this.handlers.visibility) document.removeEventListener('visibilitychange', this.handlers.visibility);
|
|
396
|
+
if (this.handlers.focus) window.removeEventListener('focus', this.handlers.focus);
|
|
397
|
+
if (this.handlers.pageshow) window.removeEventListener('pageshow', this.handlers.pageshow);
|
|
398
|
+
this.handlers = {};
|
|
399
|
+
}
|
|
400
|
+
}
|