pycoze 0.1.255__tar.gz → 0.1.257__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. {pycoze-0.1.255 → pycoze-0.1.257}/PKG-INFO +1 -1
  2. pycoze-0.1.257/pycoze/api/__init__.py +5 -0
  3. pycoze-0.1.257/pycoze/api/api.py +7 -0
  4. {pycoze-0.1.255/pycoze/reference → pycoze-0.1.257/pycoze/api/lib}/__init__.py +0 -0
  5. pycoze-0.1.257/pycoze/api/lib/window_cls.py +51 -0
  6. pycoze-0.1.257/pycoze/reference/__init__.py +0 -0
  7. pycoze-0.1.257/pycoze/utils/__init__.py +9 -0
  8. {pycoze-0.1.255 → pycoze-0.1.257}/pycoze/utils/socket.py +3 -2
  9. {pycoze-0.1.255 → pycoze-0.1.257}/pycoze.egg-info/PKG-INFO +1 -1
  10. {pycoze-0.1.255 → pycoze-0.1.257}/pycoze.egg-info/SOURCES.txt +4 -0
  11. {pycoze-0.1.255 → pycoze-0.1.257}/setup.py +1 -1
  12. pycoze-0.1.255/pycoze/utils/__init__.py +0 -5
  13. {pycoze-0.1.255 → pycoze-0.1.257}/LICENSE +0 -0
  14. {pycoze-0.1.255 → pycoze-0.1.257}/README.md +0 -0
  15. {pycoze-0.1.255 → pycoze-0.1.257}/pycoze/__init__.py +0 -0
  16. {pycoze-0.1.255 → pycoze-0.1.257}/pycoze/ai/__init__.py +0 -0
  17. {pycoze-0.1.255 → pycoze-0.1.257}/pycoze/ai/llm/__init__.py +0 -0
  18. {pycoze-0.1.255 → pycoze-0.1.257}/pycoze/ai/llm/chat.py +0 -0
  19. {pycoze-0.1.255 → pycoze-0.1.257}/pycoze/ai/llm/text_to_image_prompt.py +0 -0
  20. {pycoze-0.1.255 → pycoze-0.1.257}/pycoze/ai/llm/think.py +0 -0
  21. {pycoze-0.1.255 → pycoze-0.1.257}/pycoze/ai/vram_reserve.py +0 -0
  22. {pycoze-0.1.255 → pycoze-0.1.257}/pycoze/bot/__init__.py +0 -0
  23. {pycoze-0.1.255 → pycoze-0.1.257}/pycoze/bot/agent/__init__.py +0 -0
  24. {pycoze-0.1.255 → pycoze-0.1.257}/pycoze/bot/agent/agent.py +0 -0
  25. {pycoze-0.1.255 → pycoze-0.1.257}/pycoze/bot/agent/agent_types/__init__.py +0 -0
  26. {pycoze-0.1.255 → pycoze-0.1.257}/pycoze/bot/agent/agent_types/const.py +0 -0
  27. {pycoze-0.1.255 → pycoze-0.1.257}/pycoze/bot/agent/agent_types/openai_func_call_agent.py +0 -0
  28. {pycoze-0.1.255 → pycoze-0.1.257}/pycoze/bot/agent/assistant.py +0 -0
  29. {pycoze-0.1.255 → pycoze-0.1.257}/pycoze/bot/agent/chat.py +0 -0
  30. {pycoze-0.1.255 → pycoze-0.1.257}/pycoze/bot/agent_chat.py +0 -0
  31. {pycoze-0.1.255 → pycoze-0.1.257}/pycoze/bot/bot.py +0 -0
  32. {pycoze-0.1.255 → pycoze-0.1.257}/pycoze/reference/bot.py +0 -0
  33. {pycoze-0.1.255 → pycoze-0.1.257}/pycoze/reference/lib.py +0 -0
  34. {pycoze-0.1.255 → pycoze-0.1.257}/pycoze/reference/tool.py +0 -0
  35. {pycoze-0.1.255 → pycoze-0.1.257}/pycoze/reference/workflow.py +0 -0
  36. {pycoze-0.1.255 → pycoze-0.1.257}/pycoze/ui/__init__.py +0 -0
  37. {pycoze-0.1.255 → pycoze-0.1.257}/pycoze/ui/base.py +0 -0
  38. {pycoze-0.1.255 → pycoze-0.1.257}/pycoze/ui/color.py +0 -0
  39. {pycoze-0.1.255 → pycoze-0.1.257}/pycoze/ui/typ.py +0 -0
  40. {pycoze-0.1.255 → pycoze-0.1.257}/pycoze/ui/ui_def.py +0 -0
  41. {pycoze-0.1.255 → pycoze-0.1.257}/pycoze/utils/arg.py +0 -0
  42. {pycoze-0.1.255 → pycoze-0.1.257}/pycoze/utils/env.py +0 -0
  43. {pycoze-0.1.255 → pycoze-0.1.257}/pycoze/utils/text_or_file.py +0 -0
  44. {pycoze-0.1.255 → pycoze-0.1.257}/pycoze.egg-info/dependency_links.txt +0 -0
  45. {pycoze-0.1.255 → pycoze-0.1.257}/pycoze.egg-info/top_level.txt +0 -0
  46. {pycoze-0.1.255 → pycoze-0.1.257}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pycoze
3
- Version: 0.1.255
3
+ Version: 0.1.257
4
4
  Summary: Package for pycoze only!
5
5
  Author: Yuan Jie Xiong
6
6
  Author-email: aiqqqqqqq@qq.com
@@ -0,0 +1,5 @@
1
+ from .api import Api, api
2
+
3
+ window = api.window
4
+
5
+ # from ps_view import ViewCls, WebsiteViewCls, FileViewCls, DirectoryViewCls, WorkflowCls
@@ -0,0 +1,7 @@
1
+ from .lib.window_cls import WindowCls
2
+
3
+ class Api:
4
+ def __init__(self) -> None:
5
+ self.window = WindowCls()
6
+
7
+ oper = Api()
@@ -0,0 +1,51 @@
1
+ import sys
2
+ import subprocess
3
+ import os
4
+ from pycoze import utils
5
+
6
+
7
+ socket = utils.socket
8
+
9
+ class WindowCls:
10
+
11
+ def get_slected_text(self) -> str:
12
+ result = socket.post_and_recv_result("get-selected-text", {})
13
+ return result
14
+
15
+ def append_msg(self, message: str, type='info'):
16
+ if not isinstance(message, str):
17
+ message = repr(message)
18
+ socket.post("append-msg", {"message": message, "type": type})
19
+
20
+ def show_operation(self, text: str):
21
+ socket.post("show-operation", {"text": text})
22
+
23
+ def screenshot(self, name):
24
+ socket.post("screenshot", {"name": name})
25
+
26
+ def confirm(self, message: str) -> bool:
27
+ return socket.post_and_recv_result("confirm", {"message": message})
28
+
29
+ def maximize(self):
30
+ socket.post("maximize", {})
31
+
32
+ def open_file_with_system(self, file_path, wait: bool):
33
+ process_fn = subprocess.run if wait else subprocess.Popen
34
+ if sys.platform.startswith('linux'):
35
+ process_fn(['xdg-open', file_path])
36
+ elif sys.platform.startswith('darwin'):
37
+ process_fn(['open', file_path])
38
+ elif sys.platform.startswith('win32') or sys.platform.startswith('cygwin'):
39
+ os.startfile(file_path)
40
+ else:
41
+ raise OSError('Unsupported operating system')
42
+
43
+ def open_program(self, file_path, wait: bool):
44
+ process_fn = subprocess.run if wait else subprocess.Popen
45
+ process_fn([file_path])
46
+
47
+ def execute_javaScript(self, js_code: str):
48
+ result = socket.post_and_recv_result("executeJavaScript", {"code": js_code})
49
+ if not result["ok"]:
50
+ raise Exception(result["value"])
51
+ return result["value"] if "value" in result else None
File without changes
@@ -0,0 +1,9 @@
1
+ from .arg import read_arg
2
+ from .env import read_params_file, params, read_json_file
3
+ from .socket import TcpSocket, socket, socket_subscribe
4
+ from .text_or_file import to_text
5
+
6
+ __all__ = [read_arg,
7
+ read_params_file, params, read_json_file,
8
+ TcpSocket, socket, socket_subscribe,
9
+ to_text]
@@ -1,10 +1,11 @@
1
1
  import socket
2
2
  import json
3
3
  import uuid
4
+ from pycoze import utils
4
5
 
5
6
 
6
- tcp_port = read_arg("tcp_port")
7
-
7
+ params = utils.params
8
+ tcp_port = params["tcpPort"]
8
9
 
9
10
 
10
11
  class TcpSocket:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pycoze
3
- Version: 0.1.255
3
+ Version: 0.1.257
4
4
  Summary: Package for pycoze only!
5
5
  Author: Yuan Jie Xiong
6
6
  Author-email: aiqqqqqqq@qq.com
@@ -12,6 +12,10 @@ pycoze/ai/llm/__init__.py
12
12
  pycoze/ai/llm/chat.py
13
13
  pycoze/ai/llm/text_to_image_prompt.py
14
14
  pycoze/ai/llm/think.py
15
+ pycoze/api/__init__.py
16
+ pycoze/api/api.py
17
+ pycoze/api/lib/__init__.py
18
+ pycoze/api/lib/window_cls.py
15
19
  pycoze/bot/__init__.py
16
20
  pycoze/bot/agent_chat.py
17
21
  pycoze/bot/bot.py
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="pycoze",
5
- version="0.1.255",
5
+ version="0.1.257",
6
6
  packages=find_packages(),
7
7
  install_requires=[],
8
8
  author="Yuan Jie Xiong",
@@ -1,5 +0,0 @@
1
- from .arg import read_arg
2
- from .env import read_params_file, params, read_json_file
3
- from .text_or_file import to_text
4
-
5
- __all__ = [read_arg, read_params_file, params, read_json_file, to_text]
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
File without changes
File without changes
File without changes