This fix correctly filters out non-user-invocable agents during cached mode deserialization, matching the behavior in refreshCustomPromptModes (lines 161-163). However, there's no test coverage for this scenario. Consider adding a test in chatModeService.test.ts that verifies custom agents with userInvocable: false are not loaded from cache.
Originally posted by @Copilot in microsoft/vscode#296127 (comment)
pip install pytesseract pillow opencv-python easyocr paddleocr flask fastapi uvicorn python-multipart
import pytesseract
import cv2
import json
from pytesseract import Output
def basic_ocr_to_json(image_path):
img = cv2.imread(image_path)
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
data = pytesseract.image_to_data(gray, output_type=Output.DICT)
words = []
for i in range(len(data['text'])):
if data['text'][i].strip() != "":
words.append({
"text": data['text'][i],
"confidence": data['conf'][i],
"box": {
"x": data['left'][i],
"y": data['top'][i],
"w": data['width'][i],
"h": data['height'][i]
}
})
return {"total_words": len(words), "words": words}