@josephyan/qingflow-cli 0.2.0-beta.65 → 0.2.0-beta.66
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.
- package/README.md +2 -2
- package/package.json +1 -1
- package/pyproject.toml +1 -1
- package/src/qingflow_mcp/solution/compiler/icon_utils.py +49 -46
package/README.md
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
Install:
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
-
npm install @josephyan/qingflow-cli@0.2.0-beta.
|
|
6
|
+
npm install @josephyan/qingflow-cli@0.2.0-beta.66
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
Run:
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
npx -y -p @josephyan/qingflow-cli@0.2.0-beta.
|
|
12
|
+
npx -y -p @josephyan/qingflow-cli@0.2.0-beta.66 qingflow
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
Environment:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@josephyan/qingflow-cli",
|
|
3
|
-
"version": "0.2.0-beta.
|
|
3
|
+
"version": "0.2.0-beta.66",
|
|
4
4
|
"description": "Human-friendly Qingflow command line interface for auth, record operations, import, tasks, and stable builder flows.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
package/pyproject.toml
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
|
+
import re
|
|
4
5
|
|
|
5
6
|
|
|
6
7
|
DEFAULT_ICON_COLOR = "qing-orange"
|
|
7
8
|
DEFAULT_ICON_STYLE_POOL: tuple[tuple[str, str], ...] = (
|
|
8
9
|
("briefcase", "qing-orange"),
|
|
9
10
|
("calendar", "emerald"),
|
|
10
|
-
("folder", "azure"),
|
|
11
|
+
("files-folder", "azure"),
|
|
11
12
|
("shield-check", "indigo"),
|
|
12
13
|
("user-group", "qing-purple"),
|
|
13
14
|
("chart-square-bar", "blue"),
|
|
@@ -16,41 +17,41 @@ DEFAULT_ICON_STYLE_POOL: tuple[tuple[str, str], ...] = (
|
|
|
16
17
|
("home", "orange"),
|
|
17
18
|
("globe", "red"),
|
|
18
19
|
)
|
|
19
|
-
|
|
20
|
-
"ex-alert-outlined",
|
|
21
|
-
"ex-clock-outlined",
|
|
22
|
-
"ex-folder-outlined",
|
|
23
|
-
"ex-form-outlined",
|
|
24
|
-
"ex-home-outlined",
|
|
25
|
-
"ex-user-outlined",
|
|
20
|
+
LEGACY_EX_ICON_MAP = {
|
|
21
|
+
"ex-alert-outlined": "exclamation-circle",
|
|
22
|
+
"ex-clock-outlined": "clock",
|
|
23
|
+
"ex-folder-outlined": "folder",
|
|
24
|
+
"ex-form-outlined": "template",
|
|
25
|
+
"ex-home-outlined": "home",
|
|
26
|
+
"ex-user-outlined": "user",
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
ICON_ALIAS_MAP = {
|
|
29
|
-
"archive-box": "
|
|
30
|
-
"beaker": "
|
|
31
|
-
"briefcase": "
|
|
32
|
-
"building-office": "
|
|
33
|
-
"calendar": "
|
|
34
|
-
"chat": "
|
|
35
|
-
"chat-bubble-left-right": "
|
|
36
|
-
"chart-bar": "
|
|
37
|
-
"chart-square-bar": "
|
|
38
|
-
"check-badge": "
|
|
39
|
-
"check-circle": "
|
|
40
|
-
"clipboard-check": "
|
|
41
|
-
"clock": "
|
|
42
|
-
"cube": "
|
|
43
|
-
"document-text": "
|
|
44
|
-
"folder": "
|
|
45
|
-
"home": "
|
|
46
|
-
"office-building": "
|
|
47
|
-
"shield-check": "
|
|
48
|
-
"template": "
|
|
49
|
-
"user": "
|
|
50
|
-
"user-group": "
|
|
51
|
-
"users": "
|
|
52
|
-
"view-grid": "
|
|
53
|
-
"warning": "
|
|
30
|
+
"archive-box": "template",
|
|
31
|
+
"beaker": "beaker",
|
|
32
|
+
"briefcase": "briefcase",
|
|
33
|
+
"building-office": "office-building",
|
|
34
|
+
"calendar": "calendar",
|
|
35
|
+
"chat": "chat",
|
|
36
|
+
"chat-bubble-left-right": "chat",
|
|
37
|
+
"chart-bar": "chart-bar",
|
|
38
|
+
"chart-square-bar": "chart-square-bar",
|
|
39
|
+
"check-badge": "badge-check",
|
|
40
|
+
"check-circle": "check-circle",
|
|
41
|
+
"clipboard-check": "clipboard-check",
|
|
42
|
+
"clock": "clock",
|
|
43
|
+
"cube": "cube-transparent",
|
|
44
|
+
"document-text": "document-text",
|
|
45
|
+
"folder": "files-folder",
|
|
46
|
+
"home": "home",
|
|
47
|
+
"office-building": "office-building",
|
|
48
|
+
"shield-check": "shield-check",
|
|
49
|
+
"template": "template",
|
|
50
|
+
"user": "user",
|
|
51
|
+
"user-group": "user-group",
|
|
52
|
+
"users": "user-group",
|
|
53
|
+
"view-grid": "view-grid",
|
|
54
|
+
"warning": "exclamation-circle",
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
|
|
@@ -64,8 +65,6 @@ def encode_workspace_icon(
|
|
|
64
65
|
if icon and _looks_like_icon_json(icon):
|
|
65
66
|
return icon
|
|
66
67
|
normalized_icon_name = normalize_workspace_icon_name(icon or fallback_icon_name)
|
|
67
|
-
if normalized_icon_name and normalized_icon_name.startswith("ex-") and not color:
|
|
68
|
-
return normalized_icon_name
|
|
69
68
|
icon_name = normalized_icon_name
|
|
70
69
|
icon_color = color or DEFAULT_ICON_COLOR
|
|
71
70
|
if icon_name:
|
|
@@ -156,27 +155,31 @@ def normalize_workspace_icon_name(icon: str | None) -> str | None:
|
|
|
156
155
|
try:
|
|
157
156
|
payload = json.loads(icon)
|
|
158
157
|
except Exception:
|
|
159
|
-
return "
|
|
160
|
-
return normalize_workspace_icon_name(payload.get("iconName")) or "
|
|
161
|
-
if icon in SUPPORTED_EX_ICONS:
|
|
162
|
-
return icon
|
|
158
|
+
return "template"
|
|
159
|
+
return normalize_workspace_icon_name(payload.get("iconName")) or "template"
|
|
163
160
|
normalized = icon.strip().lower()
|
|
161
|
+
if normalized in LEGACY_EX_ICON_MAP:
|
|
162
|
+
return LEGACY_EX_ICON_MAP[normalized]
|
|
164
163
|
if normalized in ICON_ALIAS_MAP:
|
|
165
164
|
return ICON_ALIAS_MAP[normalized]
|
|
166
165
|
for token in normalized.replace("_", "-").split("-"):
|
|
167
166
|
if token in ICON_ALIAS_MAP:
|
|
168
167
|
return ICON_ALIAS_MAP[token]
|
|
169
168
|
if "folder" in normalized or "package" in normalized:
|
|
170
|
-
return "
|
|
171
|
-
if "home" in normalized
|
|
172
|
-
return "
|
|
169
|
+
return "files-folder"
|
|
170
|
+
if "home" in normalized:
|
|
171
|
+
return "home"
|
|
172
|
+
if "portal" in normalized or "dashboard" in normalized:
|
|
173
|
+
return "view-grid"
|
|
173
174
|
if "user" in normalized or "member" in normalized or "contact" in normalized:
|
|
174
|
-
return "
|
|
175
|
+
return "user"
|
|
175
176
|
if "clock" in normalized or "time" in normalized or "schedule" in normalized or "log" in normalized:
|
|
176
|
-
return "
|
|
177
|
+
return "clock"
|
|
177
178
|
if "risk" in normalized or "alert" in normalized or "warn" in normalized or "safety" in normalized:
|
|
178
|
-
return "
|
|
179
|
-
|
|
179
|
+
return "exclamation-circle"
|
|
180
|
+
if re.fullmatch(r"[a-z0-9-]+", normalized):
|
|
181
|
+
return normalized
|
|
182
|
+
return "template"
|
|
180
183
|
|
|
181
184
|
|
|
182
185
|
def _looks_like_icon_json(value: str) -> bool:
|