Files
store/fetch-stream.sune

1 line
4.1 KiB
JSON

[{"id":"mpmar2o","name":"Fetch Stream","pinned":false,"avatar":"","url":"gh://sune-org/store@main/fetch-stream.sune","updatedAt":1767018713014,"settings":{"model":"openai/gpt-5","temperature":"","top_p":"","top_k":"","frequency_penalty":"","repetition_penalty":"","min_p":"","top_a":"","verbosity":"","reasoning_effort":"default","system_prompt":"","html":"<!-- Sune: Stream State Inspector v1.1.1 -->\n<div \n id=\"sune-ssi\" \n class=\"w-full p-4\" \n x-data=\"{ \n open: false, \n loading: false, \n data: '',\n async fetchState() {\n const tid = window.THREAD?.getLastAssistantMessageId?.();\n if (!tid) return alert('Meowster, no assistant message found.');\n \n this.loading = true;\n try {\n const base = window.HTTP_BASE || 'https://orp.aww.4ev.link/ws';\n const r = await fetch(`${base}?uid=${encodeURIComponent(tid)}`);\n if (!r.ok) throw new Error(`HTTP ${r.status}`);\n const j = await r.json();\n this.data = JSON.stringify(j, null, 2);\n localStorage.setItem(window.SUNE?.id || 'sune_cache', this.data);\n this.open = true;\n } catch (e) {\n alert('Master, error: ' + e.message);\n } finally {\n this.loading = false;\n this.$nextTick(() => lucide.createIcons());\n }\n },\n copy() {\n navigator.clipboard.writeText(this.data);\n alert('Copied, Meowster!');\n }\n }\"\n x-init=\"data = localStorage.getItem(window.SUNE?.id || 'sune_cache') || ''\"\n>\n <!-- Trigger -->\n <button \n @click=\"fetchState()\" \n :disabled=\"loading\"\n class=\"w-full flex items-center justify-between p-4 bg-slate-900 text-white rounded-2xl shadow-lg active:scale-95 transition-transform disabled:opacity-50\"\n >\n <div class=\"flex items-center gap-3\">\n <div class=\"p-2 bg-white/10 rounded-lg\">\n <i data-lucide=\"terminal\" class=\"w-5 h-5 text-indigo-400\" x-show=\"!loading\"></i>\n <i data-lucide=\"loader-2\" class=\"w-5 h-5 animate-spin\" x-show=\"loading\"></i>\n </div>\n <div class=\"text-left\">\n <p class=\"text-xs font-bold leading-none\">Inspect Last Stream</p>\n <p class=\"text-[10px] text-slate-400 mt-1 font-mono\">v1.1.1</p>\n </div>\n </div>\n <i data-lucide=\"chevron-right\" class=\"w-4 h-4 text-slate-500\"></i>\n </button>\n\n <!-- Modal -->\n <div \n x-show=\"open\" \n class=\"fixed inset-0 z-[60] flex items-end sm:items-center justify-center p-4 bg-black/60 backdrop-blur-sm\"\n x-transition.opacity\n @click.self=\"open = false\"\n >\n <div class=\"bg-white w-full max-w-lg rounded-t-3xl sm:rounded-3xl overflow-hidden flex flex-col max-h-[70vh] shadow-2xl mt-16\">\n <!-- Header -->\n <div class=\"flex items-center justify-between p-4 border-b border-gray-100\">\n <span class=\"text-xs font-black uppercase tracking-tighter text-slate-400\">Stream Debugger</span>\n <button @click=\"open = false\" class=\"p-2 bg-gray-100 rounded-full\"><i data-lucide=\"x\" class=\"w-4 h-4\"></i></button>\n </div>\n\n <!-- Code Area -->\n <div class=\"flex-1 overflow-auto bg-slate-950 p-4\">\n <pre class=\"text-[10px] text-emerald-400 font-mono leading-relaxed\" x-text=\"data\"></pre>\n </div>\n\n <!-- Actions -->\n <div class=\"p-4 bg-gray-50 flex gap-2\">\n <button @click=\"copy()\" class=\"flex-1 py-3 bg-slate-900 text-white text-xs font-bold rounded-xl active:scale-95 transition\">Copy JSON</button>\n <button @click=\"open = false\" class=\"px-6 py-3 bg-white border border-gray-200 text-xs font-bold rounded-xl\">Close</button>\n </div>\n </div>\n </div>\n\n <script>\n // Ensure icons are rendered on injection\n setTimeout(() => window.lucide?.createIcons(), 100);\n </script>\n</div>\n","extension_html":"<sune src='https://raw.githubusercontent.com/sune-org/store/refs/heads/main/sync.sune' private></sune>","hide_composer":false,"include_thoughts":false,"json_output":false,"img_output":false,"aspect_ratio":"1:1","ignore_master_prompt":false,"json_schema":"","presence_penalty":"","max_tokens":""},"storage":{}}]