@tiagojct/subsub 0.19.0 → 0.21.0
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/CHANGELOG.md +24 -0
- package/README.md +4 -1
- package/dist/bench.js +31 -0
- package/dist/chrome.js +171 -0
- package/dist/config.js +2 -0
- package/dist/dialogs.js +81 -0
- package/dist/files.js +66 -0
- package/dist/look.js +36 -17
- package/dist/screens.js +314 -0
- package/dist/skin.js +37 -0
- package/dist/subsub.js +189 -29
- package/dist/web.js +7 -58
- package/dist/words.js +26 -0
- package/package.json +1 -1
- package/prompts/compare.md +1 -1
- package/prompts/lit.md +1 -1
- package/prompts/verify.md +2 -2
- package/roles/researcher.md +4 -2
- package/scripts/make-themes.mjs +112 -0
- package/scripts/plate.json +35 -0
- package/src/bench.ts +40 -0
- package/src/chrome.ts +208 -0
- package/src/config.ts +4 -0
- package/src/dialogs.ts +107 -0
- package/src/files.ts +66 -0
- package/src/look.ts +45 -18
- package/src/screens.ts +374 -0
- package/src/skin.ts +65 -0
- package/src/subsub.ts +206 -34
- package/src/web.ts +6 -51
- package/src/words.ts +40 -0
- package/themes/subsub-glauca-dark-256.json +80 -0
- package/themes/subsub-glauca-dark.json +73 -77
- package/themes/subsub-glauca-light-256.json +80 -0
- package/themes/subsub-glauca-light.json +73 -77
- package/themes/subsub-try-works-dark-256.json +80 -0
- package/themes/subsub-try-works-dark.json +73 -77
- package/themes/subsub-try-works-light-256.json +80 -0
- package/themes/subsub-try-works-light.json +73 -77
- package/scripts/make-themes.py +0 -116
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/earendil-works/pi/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
|
|
3
|
+
"name": "subsub-try-works-light-256",
|
|
4
|
+
"vars": {
|
|
5
|
+
"ink": 234,
|
|
6
|
+
"muted": 239,
|
|
7
|
+
"faint": 241,
|
|
8
|
+
"prussian": 24,
|
|
9
|
+
"madder": 94,
|
|
10
|
+
"sap": 58,
|
|
11
|
+
"gamboge": 94,
|
|
12
|
+
"mark": 102,
|
|
13
|
+
"rule": 251,
|
|
14
|
+
"accent": 94,
|
|
15
|
+
"wash": 224
|
|
16
|
+
},
|
|
17
|
+
"colors": {
|
|
18
|
+
"text": "ink",
|
|
19
|
+
"userMessageText": "ink",
|
|
20
|
+
"customMessageText": "ink",
|
|
21
|
+
"toolTitle": "ink",
|
|
22
|
+
"mdHeading": "ink",
|
|
23
|
+
"mdCode": "ink",
|
|
24
|
+
"mdCodeBlock": "ink",
|
|
25
|
+
"error": "ink",
|
|
26
|
+
"muted": "muted",
|
|
27
|
+
"toolOutput": "muted",
|
|
28
|
+
"mdQuote": "muted",
|
|
29
|
+
"toolDiffContext": "muted",
|
|
30
|
+
"thinkingText": "muted",
|
|
31
|
+
"toolDiffRemoved": "muted",
|
|
32
|
+
"dim": "faint",
|
|
33
|
+
"mdLinkUrl": "faint",
|
|
34
|
+
"syntaxComment": "faint",
|
|
35
|
+
"border": "mark",
|
|
36
|
+
"mdQuoteBorder": "mark",
|
|
37
|
+
"mdListBullet": "mark",
|
|
38
|
+
"borderMuted": "rule",
|
|
39
|
+
"mdHr": "rule",
|
|
40
|
+
"mdCodeBlockBorder": "rule",
|
|
41
|
+
"scrollbarTrack": "rule",
|
|
42
|
+
"thinkingOff": "rule",
|
|
43
|
+
"scrollbarThumb": "faint",
|
|
44
|
+
"accent": "accent",
|
|
45
|
+
"borderAccent": "accent",
|
|
46
|
+
"bashMode": "accent",
|
|
47
|
+
"customMessageLabel": "accent",
|
|
48
|
+
"thinkingXhigh": "accent",
|
|
49
|
+
"thinkingMax": "accent",
|
|
50
|
+
"mdLink": "prussian",
|
|
51
|
+
"thinkingHigh": "prussian",
|
|
52
|
+
"success": "sap",
|
|
53
|
+
"toolDiffAdded": "sap",
|
|
54
|
+
"warning": "gamboge",
|
|
55
|
+
"selectedBg": "wash",
|
|
56
|
+
"searchMatchBg": "",
|
|
57
|
+
"searchMatchText": "ink",
|
|
58
|
+
"userMessageBg": "",
|
|
59
|
+
"toolSuccessBg": "",
|
|
60
|
+
"customMessageBg": "",
|
|
61
|
+
"toolErrorBg": "",
|
|
62
|
+
"toolPendingBg": "",
|
|
63
|
+
"syntaxKeyword": "prussian",
|
|
64
|
+
"syntaxNumber": "prussian",
|
|
65
|
+
"syntaxFunction": "ink",
|
|
66
|
+
"syntaxVariable": "ink",
|
|
67
|
+
"syntaxType": "ink",
|
|
68
|
+
"syntaxString": "muted",
|
|
69
|
+
"syntaxOperator": "muted",
|
|
70
|
+
"syntaxPunctuation": "faint",
|
|
71
|
+
"thinkingMinimal": "faint",
|
|
72
|
+
"thinkingLow": "mark",
|
|
73
|
+
"thinkingMedium": "muted"
|
|
74
|
+
},
|
|
75
|
+
"export": {
|
|
76
|
+
"pageBg": "#e9ece6",
|
|
77
|
+
"cardBg": "#f4f5f1",
|
|
78
|
+
"infoBg": "#dfe3dc"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -2,90 +2,86 @@
|
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/earendil-works/pi/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
|
|
3
3
|
"name": "subsub-try-works-light",
|
|
4
4
|
"vars": {
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"muted": "#
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"dim": "#827768",
|
|
24
|
-
"select": "#ded6c4",
|
|
25
|
-
"okBg": "#e2ebe5",
|
|
26
|
-
"errBg": "#f5e4e2"
|
|
5
|
+
"sheet": "#e9ece6",
|
|
6
|
+
"sunk": "#dfe3dc",
|
|
7
|
+
"field": "#f4f5f1",
|
|
8
|
+
"ink": "#16202a",
|
|
9
|
+
"muted": "#44505b",
|
|
10
|
+
"faint": "#5d6870",
|
|
11
|
+
"rule": "#c6ccc6",
|
|
12
|
+
"mark": "#7d878e",
|
|
13
|
+
"prussian": "#2c5d87",
|
|
14
|
+
"prussianWash": "#d8e2eb",
|
|
15
|
+
"madder": "#a8432d",
|
|
16
|
+
"madderWash": "#f0ddd6",
|
|
17
|
+
"sap": "#4f6a2e",
|
|
18
|
+
"sapWash": "#dfe7d2",
|
|
19
|
+
"gamboge": "#86601a",
|
|
20
|
+
"gambogeWash": "#f2e5c6",
|
|
21
|
+
"accent": "#a8432d",
|
|
22
|
+
"wash": "#f0ddd6"
|
|
27
23
|
},
|
|
28
24
|
"colors": {
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
25
|
+
"text": "ink",
|
|
26
|
+
"userMessageText": "ink",
|
|
27
|
+
"customMessageText": "ink",
|
|
28
|
+
"toolTitle": "ink",
|
|
29
|
+
"mdHeading": "ink",
|
|
30
|
+
"mdCode": "ink",
|
|
31
|
+
"mdCodeBlock": "ink",
|
|
32
|
+
"error": "ink",
|
|
36
33
|
"muted": "muted",
|
|
37
|
-
"dim": "dim",
|
|
38
|
-
"text": "text",
|
|
39
|
-
"thinkingText": "muted",
|
|
40
|
-
"selectedBg": "select",
|
|
41
|
-
"scrollbarTrack": "line",
|
|
42
|
-
"scrollbarThumb": "muted",
|
|
43
|
-
"searchMatchBg": "select",
|
|
44
|
-
"searchMatchText": "text",
|
|
45
|
-
"userMessageBg": "raised",
|
|
46
|
-
"userMessageText": "text",
|
|
47
|
-
"customMessageBg": "surface",
|
|
48
|
-
"customMessageText": "text",
|
|
49
|
-
"customMessageLabel": "tone",
|
|
50
|
-
"toolPendingBg": "surface",
|
|
51
|
-
"toolSuccessBg": "okBg",
|
|
52
|
-
"toolErrorBg": "errBg",
|
|
53
|
-
"toolTitle": "text",
|
|
54
34
|
"toolOutput": "muted",
|
|
55
|
-
"mdHeading": "tone",
|
|
56
|
-
"mdLink": "link",
|
|
57
|
-
"mdLinkUrl": "dim",
|
|
58
|
-
"mdCode": "green",
|
|
59
|
-
"mdCodeBlock": "text",
|
|
60
|
-
"mdCodeBlockBorder": "line",
|
|
61
35
|
"mdQuote": "muted",
|
|
62
|
-
"mdQuoteBorder": "toneBright",
|
|
63
|
-
"mdHr": "line",
|
|
64
|
-
"mdListBullet": "toneBright",
|
|
65
|
-
"toolDiffAdded": "green",
|
|
66
|
-
"toolDiffRemoved": "red",
|
|
67
36
|
"toolDiffContext": "muted",
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"bashMode": "
|
|
37
|
+
"thinkingText": "muted",
|
|
38
|
+
"toolDiffRemoved": "muted",
|
|
39
|
+
"dim": "faint",
|
|
40
|
+
"mdLinkUrl": "faint",
|
|
41
|
+
"syntaxComment": "faint",
|
|
42
|
+
"border": "mark",
|
|
43
|
+
"mdQuoteBorder": "mark",
|
|
44
|
+
"mdListBullet": "mark",
|
|
45
|
+
"borderMuted": "rule",
|
|
46
|
+
"mdHr": "rule",
|
|
47
|
+
"mdCodeBlockBorder": "rule",
|
|
48
|
+
"scrollbarTrack": "rule",
|
|
49
|
+
"thinkingOff": "rule",
|
|
50
|
+
"scrollbarThumb": "faint",
|
|
51
|
+
"accent": "accent",
|
|
52
|
+
"borderAccent": "accent",
|
|
53
|
+
"bashMode": "accent",
|
|
54
|
+
"customMessageLabel": "accent",
|
|
55
|
+
"thinkingXhigh": "accent",
|
|
56
|
+
"thinkingMax": "accent",
|
|
57
|
+
"mdLink": "prussian",
|
|
58
|
+
"thinkingHigh": "prussian",
|
|
59
|
+
"success": "sap",
|
|
60
|
+
"toolDiffAdded": "sap",
|
|
61
|
+
"warning": "gamboge",
|
|
62
|
+
"selectedBg": "wash",
|
|
63
|
+
"searchMatchBg": "gambogeWash",
|
|
64
|
+
"searchMatchText": "ink",
|
|
65
|
+
"userMessageBg": "field",
|
|
66
|
+
"toolSuccessBg": "field",
|
|
67
|
+
"customMessageBg": "sunk",
|
|
68
|
+
"toolErrorBg": "sunk",
|
|
69
|
+
"toolPendingBg": "gambogeWash",
|
|
70
|
+
"syntaxKeyword": "prussian",
|
|
71
|
+
"syntaxNumber": "prussian",
|
|
72
|
+
"syntaxFunction": "ink",
|
|
73
|
+
"syntaxVariable": "ink",
|
|
74
|
+
"syntaxType": "ink",
|
|
75
|
+
"syntaxString": "muted",
|
|
76
|
+
"syntaxOperator": "muted",
|
|
77
|
+
"syntaxPunctuation": "faint",
|
|
78
|
+
"thinkingMinimal": "faint",
|
|
79
|
+
"thinkingLow": "mark",
|
|
80
|
+
"thinkingMedium": "muted"
|
|
85
81
|
},
|
|
86
82
|
"export": {
|
|
87
|
-
"pageBg": "#
|
|
88
|
-
"cardBg": "#
|
|
89
|
-
"infoBg": "#
|
|
83
|
+
"pageBg": "#e9ece6",
|
|
84
|
+
"cardBg": "#f4f5f1",
|
|
85
|
+
"infoBg": "#dfe3dc"
|
|
90
86
|
}
|
|
91
87
|
}
|
package/scripts/make-themes.py
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
"""Write pi themes for Sub-Sub from Gam design-system sources.
|
|
3
|
-
|
|
4
|
-
python3 scripts/make-themes.py NAME SOURCE.json VSCODE-DARK.json VSCODE-LIGHT.json
|
|
5
|
-
|
|
6
|
-
SOURCE.json is the design system's single source (modes, palette). The VS Code
|
|
7
|
-
themes that Gam generates supply the syntax colours per mode. Output:
|
|
8
|
-
themes/subsub-NAME-dark.json and themes/subsub-NAME-light.json.
|
|
9
|
-
|
|
10
|
-
The accent (the design system's one mark) is kept for the few places that need a
|
|
11
|
-
mark: the banner, the active border, bash mode and the highest thinking level.
|
|
12
|
-
Headings, bullets and borders use the cool tones.
|
|
13
|
-
"""
|
|
14
|
-
|
|
15
|
-
import json
|
|
16
|
-
import sys
|
|
17
|
-
from pathlib import Path
|
|
18
|
-
|
|
19
|
-
OUT = Path(__file__).resolve().parent.parent / "themes"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
def hexrgb(h):
|
|
23
|
-
h = h.lstrip("#")
|
|
24
|
-
return tuple(int(h[i:i + 2], 16) for i in (0, 2, 4))
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
def mix(a, b, t):
|
|
28
|
-
"""t = 0 gives a, t = 1 gives b."""
|
|
29
|
-
ra, rb = hexrgb(a), hexrgb(b)
|
|
30
|
-
return "#" + "".join(f"{round(x + (y - x) * t):02x}" for x, y in zip(ra, rb))
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
def token(vs, scope):
|
|
34
|
-
for tc in vs.get("tokenColors", []):
|
|
35
|
-
sc = tc.get("scope")
|
|
36
|
-
scopes = [sc] if isinstance(sc, str) else sc
|
|
37
|
-
if scope in scopes:
|
|
38
|
-
return tc["settings"]["foreground"].lower()
|
|
39
|
-
raise KeyError(scope)
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
def tone(m, part):
|
|
43
|
-
"""try-works calls the cool tones sea-*, Glauca tint-*."""
|
|
44
|
-
for prefix in ("sea", "tint"):
|
|
45
|
-
k = f"{prefix}{'-' + part if part else ''}"
|
|
46
|
-
if k in m:
|
|
47
|
-
return m[k].lower()
|
|
48
|
-
raise KeyError(part)
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
def theme(name, scheme, m, vs):
|
|
52
|
-
dark = scheme == "dark"
|
|
53
|
-
c = vs["colors"]
|
|
54
|
-
v = {
|
|
55
|
-
"bg": m["bg"], "surface": m["surface"], "raised": m["surface-raised"],
|
|
56
|
-
"text": m["text"], "muted": m["text-muted"], "line": m["border"],
|
|
57
|
-
"mark": m["accent"], "markBright": m["accent-bright"], "markDeep": m["accent-deep"],
|
|
58
|
-
"toneDeep": tone(m, "deep"), "tone": tone(m, ""), "toneBright": tone(m, "bright"), "tonePale": tone(m, "pale"),
|
|
59
|
-
"green": token(vs, "markup.inserted"), "red": c["terminal.ansiRed"].lower(),
|
|
60
|
-
"yellow": c["terminal.ansiYellow"].lower(), "violet": token(vs, "constant.numeric"),
|
|
61
|
-
"link": token(vs, "entity.name.function"),
|
|
62
|
-
}
|
|
63
|
-
v = {k: val.lower() for k, val in v.items()}
|
|
64
|
-
v["dim"] = mix(v["muted"], v["bg"], 0.35)
|
|
65
|
-
v["select"] = c["list.activeSelectionBackground"].lower()
|
|
66
|
-
v["okBg"] = mix(v["surface"], v["green"], 0.14)
|
|
67
|
-
v["errBg"] = mix(v["surface"], v["red"], 0.16)
|
|
68
|
-
heading = "tonePale" if dark else "tone"
|
|
69
|
-
colors = {
|
|
70
|
-
"accent": "mark", "border": "toneBright", "borderAccent": "mark", "borderMuted": "line",
|
|
71
|
-
"success": "green", "error": "red", "warning": "yellow",
|
|
72
|
-
"muted": "muted", "dim": "dim", "text": "text", "thinkingText": "muted",
|
|
73
|
-
"selectedBg": "select", "scrollbarTrack": "line", "scrollbarThumb": "muted",
|
|
74
|
-
"searchMatchBg": "select", "searchMatchText": "text",
|
|
75
|
-
"userMessageBg": "raised", "userMessageText": "text",
|
|
76
|
-
"customMessageBg": "surface", "customMessageText": "text", "customMessageLabel": heading,
|
|
77
|
-
"toolPendingBg": "surface", "toolSuccessBg": "okBg", "toolErrorBg": "errBg",
|
|
78
|
-
"toolTitle": "text", "toolOutput": "muted",
|
|
79
|
-
"mdHeading": heading, "mdLink": "link", "mdLinkUrl": "dim", "mdCode": "green",
|
|
80
|
-
"mdCodeBlock": "text", "mdCodeBlockBorder": "line", "mdQuote": "muted", "mdQuoteBorder": "toneBright",
|
|
81
|
-
"mdHr": "line", "mdListBullet": "toneBright",
|
|
82
|
-
"toolDiffAdded": "green", "toolDiffRemoved": "red", "toolDiffContext": "muted",
|
|
83
|
-
"syntaxComment": token(vs, "comment"), "syntaxKeyword": token(vs, "keyword"),
|
|
84
|
-
"syntaxFunction": token(vs, "entity.name.function"), "syntaxVariable": token(vs, "variable"),
|
|
85
|
-
"syntaxString": token(vs, "string"), "syntaxNumber": token(vs, "constant.numeric"),
|
|
86
|
-
"syntaxType": token(vs, "entity.name.type"), "syntaxOperator": token(vs, "keyword.operator"),
|
|
87
|
-
"syntaxPunctuation": token(vs, "punctuation"),
|
|
88
|
-
"thinkingOff": "line", "thinkingMinimal": "dim", "thinkingLow": "toneBright", "thinkingMedium": heading,
|
|
89
|
-
"thinkingHigh": "violet", "thinkingXhigh": "markBright", "thinkingMax": "mark",
|
|
90
|
-
"bashMode": "mark",
|
|
91
|
-
}
|
|
92
|
-
return {
|
|
93
|
-
"$schema": "https://raw.githubusercontent.com/earendil-works/pi/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
|
|
94
|
-
"name": name,
|
|
95
|
-
"vars": v,
|
|
96
|
-
"colors": colors,
|
|
97
|
-
"export": {"pageBg": v["bg"], "cardBg": v["surface"], "infoBg": v["raised"]},
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
def main():
|
|
102
|
-
name, source, vs_dark, vs_light = sys.argv[1:5]
|
|
103
|
-
src = json.loads(Path(source).read_text())
|
|
104
|
-
modes = src["modes"]
|
|
105
|
-
by_scheme = {m["scheme"]: m for m in modes.values()}
|
|
106
|
-
OUT.mkdir(exist_ok=True)
|
|
107
|
-
for scheme, vs_path in (("dark", vs_dark), ("light", vs_light)):
|
|
108
|
-
vs = json.loads(Path(vs_path).read_text())
|
|
109
|
-
tname = f"subsub-{name}-{scheme}"
|
|
110
|
-
t = theme(tname, scheme, by_scheme[scheme], vs)
|
|
111
|
-
(OUT / f"{tname}.json").write_text(json.dumps(t, indent="\t") + "\n")
|
|
112
|
-
print(OUT / f"{tname}.json", f"({by_scheme[scheme].get('label', scheme)})")
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
if __name__ == "__main__":
|
|
116
|
-
main()
|