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.
@@ -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()