kotonebot 0.1.0__py3-none-any.whl → 0.2.0__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.
- kotonebot/backend/context/context.py +1008 -1000
- kotonebot/backend/debug/vars.py +6 -1
- kotonebot/backend/image.py +778 -748
- kotonebot/backend/loop.py +283 -276
- kotonebot/client/device.py +6 -3
- kotonebot-0.2.0.dist-info/METADATA +76 -0
- {kotonebot-0.1.0.dist-info → kotonebot-0.2.0.dist-info}/RECORD +10 -10
- kotonebot-0.1.0.dist-info/METADATA +0 -204
- {kotonebot-0.1.0.dist-info → kotonebot-0.2.0.dist-info}/WHEEL +0 -0
- {kotonebot-0.1.0.dist-info → kotonebot-0.2.0.dist-info}/licenses/LICENSE +0 -0
- {kotonebot-0.1.0.dist-info → kotonebot-0.2.0.dist-info}/top_level.txt +0 -0
kotonebot/backend/debug/vars.py
CHANGED
|
@@ -4,7 +4,6 @@ import json
|
|
|
4
4
|
import time
|
|
5
5
|
import uuid
|
|
6
6
|
import shutil
|
|
7
|
-
import psutil
|
|
8
7
|
import hashlib
|
|
9
8
|
import traceback
|
|
10
9
|
from pathlib import Path
|
|
@@ -12,6 +11,7 @@ from functools import cache
|
|
|
12
11
|
from datetime import datetime
|
|
13
12
|
from dataclasses import dataclass
|
|
14
13
|
from typing import NamedTuple, TextIO, Literal
|
|
14
|
+
import warnings
|
|
15
15
|
|
|
16
16
|
import cv2
|
|
17
17
|
from cv2.typing import MatLike
|
|
@@ -188,6 +188,11 @@ IDEType = Literal['vscode', 'cursor', 'windsurf']
|
|
|
188
188
|
@cache
|
|
189
189
|
def get_current_ide() -> IDEType | None:
|
|
190
190
|
"""获取当前IDE类型"""
|
|
191
|
+
try:
|
|
192
|
+
import psutil
|
|
193
|
+
except ImportError:
|
|
194
|
+
warnings.warn('Not able to detect IDE type. Install psutil for better developer experience.')
|
|
195
|
+
return None
|
|
191
196
|
me = psutil.Process()
|
|
192
197
|
while True:
|
|
193
198
|
parent = me.parent()
|