feat: add functional plugin icons

This commit is contained in:
CJYSEX
2026-07-23 12:43:41 +08:00
parent 1b674e31da
commit ba5f32bad3
17 changed files with 115 additions and 0 deletions

View File

@@ -20,6 +20,8 @@
"capabilities": ["Interactive", "Read", "Write"], "capabilities": ["Interactive", "Read", "Write"],
"websiteURL": "https://git.cjysa.top/CJYSA/codex-free-market", "websiteURL": "https://git.cjysa.top/CJYSA/codex-free-market",
"brandColor": "#2563EB", "brandColor": "#2563EB",
"composerIcon": "./assets/icon.png",
"logo": "./assets/logo.png",
"defaultPrompt": [ "defaultPrompt": [
"把这份内容整理成一份专业的 Word 文档。", "把这份内容整理成一份专业的 Word 文档。",
"在保留格式的前提下修改这个 DOCX。", "在保留格式的前提下修改这个 DOCX。",

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<rect width="512" height="512" rx="112" fill="#2563EB"/>
<path d="M146 92h166l54 54v274H146z" fill="#fff"/>
<path d="M312 92v70h54" fill="#BFDBFE"/>
<path d="M184 232h144M184 286h144M184 340h102" stroke="#2563EB" stroke-width="24" stroke-linecap="round"/>
</svg>

After

Width:  |  Height:  |  Size: 334 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@@ -20,6 +20,8 @@
"capabilities": ["Interactive", "Read", "Write"], "capabilities": ["Interactive", "Read", "Write"],
"websiteURL": "https://git.cjysa.top/CJYSA/codex-free-market", "websiteURL": "https://git.cjysa.top/CJYSA/codex-free-market",
"brandColor": "#DC2626", "brandColor": "#DC2626",
"composerIcon": "./assets/icon.png",
"logo": "./assets/logo.png",
"defaultPrompt": [ "defaultPrompt": [
"提取并总结这个 PDF 的内容。", "提取并总结这个 PDF 的内容。",
"把这些 PDF 合并并检查页面是否正常。", "把这些 PDF 合并并检查页面是否正常。",

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<rect width="512" height="512" rx="112" fill="#DC2626"/>
<path d="M146 92h166l54 54v274H146z" fill="#fff"/>
<path d="M312 92v70h54" fill="#FECACA"/>
<path d="M184 248c35-46 68-48 92-8 24 40 46 85 64 85 15 0 29-18 42-54" fill="none" stroke="#DC2626" stroke-width="22" stroke-linecap="round"/>
<path d="M184 350h144" stroke="#DC2626" stroke-width="22" stroke-linecap="round"/>
</svg>

After

Width:  |  Height:  |  Size: 455 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@@ -20,6 +20,8 @@
"capabilities": ["Interactive", "Read", "Write"], "capabilities": ["Interactive", "Read", "Write"],
"websiteURL": "https://git.cjysa.top/CJYSA/codex-free-market", "websiteURL": "https://git.cjysa.top/CJYSA/codex-free-market",
"brandColor": "#C43E1C", "brandColor": "#C43E1C",
"composerIcon": "./assets/icon.png",
"logo": "./assets/logo.png",
"defaultPrompt": [ "defaultPrompt": [
"根据这份材料制作一套结构清晰的 PPT。", "根据这份材料制作一套结构清晰的 PPT。",
"保留模板风格并修改这个演示文稿。", "保留模板风格并修改这个演示文稿。",

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<rect width="512" height="512" rx="112" fill="#C43E1C"/>
<rect x="104" y="114" width="304" height="226" rx="18" fill="#fff"/>
<path d="M256 340v58M188 398h136" stroke="#fff" stroke-width="24" stroke-linecap="round"/>
<path d="M154 292v-62h48v62M232 292v-112h48v112M310 292v-88h48v88" fill="#FED7AA" stroke="#C43E1C" stroke-width="12"/>
<path d="M138 340h236" stroke="#FED7AA" stroke-width="14"/>
</svg>

After

Width:  |  Height:  |  Size: 476 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@@ -20,6 +20,8 @@
"capabilities": ["Interactive", "Read", "Write"], "capabilities": ["Interactive", "Read", "Write"],
"websiteURL": "https://git.cjysa.top/CJYSA/codex-free-market", "websiteURL": "https://git.cjysa.top/CJYSA/codex-free-market",
"brandColor": "#107C41", "brandColor": "#107C41",
"composerIcon": "./assets/icon.png",
"logo": "./assets/logo.png",
"defaultPrompt": [ "defaultPrompt": [
"把这份 CSV 整理成带公式和格式的 Excel。", "把这份 CSV 整理成带公式和格式的 Excel。",
"分析这个工作簿并解释关键指标。", "分析这个工作簿并解释关键指标。",

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<rect width="512" height="512" rx="112" fill="#107C41"/>
<rect x="112" y="106" width="288" height="300" rx="20" fill="#fff"/>
<rect x="144" y="164" width="224" height="198" fill="#DCFCE7"/>
<path d="M144 230h224M144 296h224M218 164v198M292 164v198" stroke="#107C41" stroke-width="18"/>
<path d="M144 132h224" stroke="#86EFAC" stroke-width="26"/>
</svg>

After

Width:  |  Height:  |  Size: 426 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@@ -0,0 +1,80 @@
from pathlib import Path
from PIL import Image, ImageDraw
ROOT = Path(__file__).resolve().parents[1]
SIZE = 512
def rounded(draw, box, radius, fill):
draw.rounded_rectangle(box, radius=radius, fill=fill)
def document(path, color):
image = Image.new("RGBA", (SIZE, SIZE), (0, 0, 0, 0))
draw = ImageDraw.Draw(image)
rounded(draw, (0, 0, 511, 511), 112, color)
draw.polygon([(146, 92), (312, 92), (366, 146), (366, 420), (146, 420)], fill="white")
draw.polygon([(312, 92), (312, 162), (366, 162)], fill="#BFDBFE")
for y, width in [(232, 144), (286, 144), (340, 102)]:
draw.line((184, y, 184 + width, y), fill=color, width=24)
image.save(path)
def pdf(path, color):
image = Image.new("RGBA", (SIZE, SIZE), (0, 0, 0, 0))
draw = ImageDraw.Draw(image)
rounded(draw, (0, 0, 511, 511), 112, color)
draw.polygon([(146, 92), (312, 92), (366, 146), (366, 420), (146, 420)], fill="white")
draw.polygon([(312, 92), (312, 162), (366, 162)], fill="#FECACA")
draw.arc((180, 198, 318, 338), 205, 345, fill=color, width=22)
draw.line((184, 350, 328, 350), fill=color, width=22)
image.save(path)
def spreadsheet(path, color):
image = Image.new("RGBA", (SIZE, SIZE), (0, 0, 0, 0))
draw = ImageDraw.Draw(image)
rounded(draw, (0, 0, 511, 511), 112, color)
rounded(draw, (112, 106, 400, 406), 20, "white")
draw.rectangle((144, 164, 368, 362), fill="#DCFCE7")
for y in (230, 296):
draw.line((144, y, 368, y), fill=color, width=18)
for x in (218, 292):
draw.line((x, 164, x, 362), fill=color, width=18)
draw.line((144, 132, 368, 132), fill="#86EFAC", width=26)
image.save(path)
def presentation(path, color):
image = Image.new("RGBA", (SIZE, SIZE), (0, 0, 0, 0))
draw = ImageDraw.Draw(image)
rounded(draw, (0, 0, 511, 511), 112, color)
rounded(draw, (104, 114, 408, 340), 18, "white")
draw.line((256, 340, 256, 398), fill="white", width=24)
draw.line((188, 398, 324, 398), fill="white", width=24)
draw.rectangle((154, 230, 202, 292), fill="#FED7AA", outline=color, width=12)
draw.rectangle((232, 180, 280, 292), fill="#FED7AA", outline=color, width=12)
draw.rectangle((310, 204, 358, 292), fill="#FED7AA", outline=color, width=12)
draw.line((138, 340, 374, 340), fill="#FED7AA", width=14)
image.save(path)
def main():
assets = {
"cjysa-documents": (document, "#2563EB"),
"cjysa-pdf": (pdf, "#DC2626"),
"cjysa-spreadsheets": (spreadsheet, "#107C41"),
"cjysa-presentations": (presentation, "#C43E1C"),
}
for plugin, (builder, color) in assets.items():
target = ROOT / "plugins" / plugin / "assets"
target.mkdir(parents=True, exist_ok=True)
builder(target / "icon.png", color)
builder(target / "logo.png", color)
print(target / "icon.png")
if __name__ == "__main__":
main()