Skip to content

Commit ba146d7

Browse files
committed
feat(levelcode-ai): /rme — a quiet remind-me line
An undocumented composer command. `/rme` renders a single reflective line as a calm remind-me card (serif italic behind a soft accent rule). Handled locally in doSend alongside /skills — no LLM call, no network. The words themselves are kept out of the source: stored base64 and decoded (UTF-8 aware, the text is Cyrillic) only when the command runs, so they surface in the app and not to anyone scanning the file. Not listed in any command help or autocomplete — it's meant to be found, not advertised. Verified in a rendered webview: /rme echoes the command and prints the exact line; the plaintext appears nowhere in the repo. Compile + full gate green.
1 parent ed7f1a3 commit ba146d7

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

extensions/levelcode-ai/media/chat.html

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@
7676
#jumpLatest:hover { opacity: 1; background: var(--vscode-toolbar-hoverBackground, rgba(127,127,127,.25)); }
7777
.msg { white-space: normal; word-wrap: break-word; line-height: 1.5; }
7878
.msg .role { font-size: 11px; opacity: .55; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .05em; }
79+
/* a quiet remind-me line: a soft accent rule, small label, the words in a calm serif italic */
80+
.rme { margin: 0 4px; padding: 10px 0 10px 14px; border-left: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); }
81+
.rme .rme-tag { display: flex; align-items: center; gap: 6px; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 5px; }
82+
.rme .rme-tag .ci { width: 12px; height: 12px; }
83+
.rme .rme-body { font-family: Georgia, 'Times New Roman', ui-serif, serif; font-style: italic; font-size: 14.5px; line-height: 1.6; color: var(--vscode-foreground); }
7984
/* continuation narration: no second speaker label, and pulled up against the 12px log gap so the
8085
prose reads as one voice continuing rather than a fresh announcement */
8186
.msg.cont { margin-top: -5px; }
@@ -1437,6 +1442,21 @@
14371442
+ '<div class="body">' + html + '</div>';
14381443
log.appendChild(d); scrollIfStuck(); return d.querySelector('.body');
14391444
}
1445+
// A remind-me line. The words are kept out of the source as base64 and decoded only here, so
1446+
// they surface only when someone runs /rme — not to anyone scanning the file. UTF-8 aware decode
1447+
// (the text is Cyrillic), so atob's byte string is run back through TextDecoder.
1448+
var RME_B64 = '0KHQsNC80L7QtNC+0YHRgtCw0YLQvdGW0YHRgtGMLCDQt9Cx0YPQtNC+0LLQsNC90LAsINGJ0L7QsSDRg9C90LjQutC90YPRgtC4INC/0L7QutC40L3Rg9GC0L7RgdGC0ZYsIOKAlCDRhtC1INGB0LDQvNC1INGC0LUsINGJ0L4g0YLRgNC40LzQsNGUINC70Y7QtNC10Lkg0L3QsCDQstGW0LTRgdGC0LDQvdGWLg==';
1449+
function rmeText(){
1450+
try { return new TextDecoder().decode(Uint8Array.from(atob(RME_B64), function(c){ return c.charCodeAt(0); })); }
1451+
catch (e) { return ''; }
1452+
}
1453+
function addReminder(){
1454+
clearEmpty();
1455+
var d = document.createElement('div'); d.className = 'rme';
1456+
d.innerHTML = '<div class="rme-tag">' + codicon('sparkle') + ' Remind me</div>'
1457+
+ '<div class="rme-body">' + esc(rmeText()) + '</div>';
1458+
log.appendChild(d); scrollIfStuck();
1459+
}
14401460
function addAutoCtx(names){
14411461
if (!names || !names.length) { return; }
14421462
clearEmpty();
@@ -2461,6 +2481,7 @@
24612481
histIdx = -1; histDraft = '';
24622482
// Slash commands — handled locally (deterministic, no LLM call).
24632483
if (/^\/skills\b/i.test(t)){ add('user', esc(t)); forceStick(); input.value = ''; auto(); vscode.postMessage({ type: 'listSkills' }); return; }
2484+
if (/^\/rme\b/i.test(t)){ add('user', esc(t)); forceStick(); input.value = ''; auto(); addReminder(); return; }
24642485
add('user', render(t)); forceStick(); input.value = ''; auto();
24652486
vscode.postMessage({ type: 'send', text: t });
24662487
}

0 commit comments

Comments
 (0)