1
0

refactor: break up search_thoughts() into focused helpers (#597)

Co-authored-by: Kimi Agent <kimi@timmy.local>
Co-committed-by: Kimi Agent <kimi@timmy.local>
This commit is contained in:
2026-03-20 12:26:51 -04:00
committed by Timmy Time
parent 2577b71207
commit 0029c34bb1
2 changed files with 56 additions and 46 deletions

View File

@@ -21,6 +21,10 @@ Usage::
from __future__ import annotations
import logging
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from PIL import ImageDraw
import os
import shutil
import sqlite3
@@ -270,7 +274,7 @@ async def create_gitea_issue_via_mcp(title: str, body: str = "", labels: str = "
return f"Failed to create issue via MCP: {exc}"
def _draw_background(draw: "ImageDraw.ImageDraw", size: int) -> None:
def _draw_background(draw: ImageDraw.ImageDraw, size: int) -> None:
"""Draw radial gradient background with concentric circles."""
for i in range(size // 2, 0, -4):
g = int(25 + (i / (size // 2)) * 30)
@@ -280,7 +284,7 @@ def _draw_background(draw: "ImageDraw.ImageDraw", size: int) -> None:
)
def _draw_wizard(draw: "ImageDraw.ImageDraw") -> None:
def _draw_wizard(draw: ImageDraw.ImageDraw) -> None:
"""Draw wizard hat, face, eyes, smile, monogram, and robe."""
hat_color = (100, 50, 160) # purple
hat_outline = (180, 130, 255)
@@ -314,7 +318,7 @@ def _draw_wizard(draw: "ImageDraw.ImageDraw") -> None:
)
def _draw_stars(draw: "ImageDraw.ImageDraw") -> None:
def _draw_stars(draw: ImageDraw.ImageDraw) -> None:
"""Draw decorative gold stars around the wizard hat."""
gold = (220, 190, 50)
for sx, sy in [(120, 100), (380, 120), (100, 300), (400, 280), (256, 10)]: