mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-08 08:52:12 +00:00
- workspace.symbols becomes the project method project.symbols(query, limit), like find-files; the Rust SDK's Project::symbols is unchanged, components built against the previous main need a rebuild. - The open-log-tab web message names its arguments args, as pty-spawn and the services process-log do; baseArgs is refused with log-error rather than ignored. - Document the hover, semantic-tokens and diagnostics provider exports and their worlds.
34 lines
1.6 KiB
HTML
34 lines
1.6 KiB
HTML
<!doctype html>
|
|
<html><head><meta charset="utf-8"><title>Log Probe</title>
|
|
<style>
|
|
body { background: var(--openidea-bg); color: var(--openidea-fg); font-family: var(--openidea-font, sans-serif); padding: 12px; }
|
|
button { font: inherit; padding: 6px; } pre { white-space: pre-wrap; }
|
|
</style></head><body>
|
|
<h2>Streaming log tab</h2>
|
|
<p>Grant process:bash in Settings → Plugins, then open the stream. Toggle Verbose to restart it. Switch tabs, find, clear, wrap, and close the tab.</p>
|
|
<button id="open">Open log stream</button>
|
|
<button id="denied">Try undeclared program</button>
|
|
<pre id="status" aria-live="polite"></pre>
|
|
<script>
|
|
const script = `i=0
|
|
while true; do
|
|
i=$((i+1))
|
|
printf 'INFO probe line %s — Unicode 日志\n' "$i"
|
|
if [ "$1" = "--verbose" ]; then printf 'DEBUG verbose output enabled\n'; fi
|
|
if [ "$i" = 1 ]; then printf 'WARN a long line for wrapping: %0200d\n' 0; fi
|
|
read -t 1 ignored || true
|
|
done`;
|
|
const send = (program) => openidea.postMessage(JSON.stringify({
|
|
op: 'open-log-tab', key: 'probe', title: 'Probe logs', program,
|
|
args: ['--noprofile', '--norc', '-c', script, 'log-probe'],
|
|
toggles: [{ id: 'verbose', label: 'Verbose', args: ['--verbose'] }]
|
|
}));
|
|
document.querySelector('#open').onclick = () => send('bash');
|
|
document.querySelector('#denied').onclick = () => send('sh');
|
|
openidea.onMessage(text => {
|
|
if (text === 'open' || text === 'denied') { send(text === 'open' ? 'bash' : 'sh'); return; }
|
|
let m; try { m = JSON.parse(text); } catch { return; }
|
|
if (m.op === 'log-error') document.querySelector('#status').textContent = m.error;
|
|
});
|
|
</script></body></html>
|