[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71V84DGS3SN4VJ829MHNBB8":3,"skill-same:01M71V84DGS3SN4VJ829MHNBB8":85},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":33,"linkOnly":34,"markdownContent":35,"markdownBody":36,"frontMatter":37,"refName":39,"commitSha":40,"skillDirectory":41,"forksCount":42,"repositoryHtmlUrl":43,"repositoryHomepageUrl":44,"ownerHtmlUrl":45,"ownerBlogUrl":46,"ownerDescription":47,"updatedAt":48,"install":49,"resources":62},"01M71V84DGS3SN4VJ829MHNBB8","runtime",null,"Guide for assistant-ui runtime system and state management. Use when working with runtimes, accessing state, or managing thread\u002Fmessage data.","AkaraChen\u002Fangel-engine","AkaraChen","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F85140972?v=4","01M6E197RY34TPAFK03227R387","01M71V2QPZM89DQ8R1AB7021P4",19,"MIT","https:\u002F\u002Fgithub.com\u002FAkaraChen\u002Fangel-engine\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Fruntime\u002FSKILL.md",[],[5,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32],"assistant","state management","state","ui","data","system","management","guide","use","message","runtimes","with","for","thread","when","2026-11-10 13:02:02",false,"---\nname: runtime\ndescription: Guide for assistant-ui runtime system and state management. Use when working with runtimes, accessing state, or managing thread\u002Fmessage data.\nversion: 0.0.1\nlicense: MIT\n---\n\n# assistant-ui Runtime\n\n**Always consult [assistant-ui.com\u002Fllms.txt](https:\u002F\u002Fassistant-ui.com\u002Fllms.txt) for latest API.**\n\n## References\n\n- [.\u002Freferences\u002Flocal-runtime.md](.\u002Freferences\u002Flocal-runtime.md) -- useLocalRuntime deep dive\n- [.\u002Freferences\u002Fexternal-store.md](.\u002Freferences\u002Fexternal-store.md) -- useExternalStoreRuntime deep dive\n- [.\u002Freferences\u002Fthread-list.md](.\u002Freferences\u002Fthread-list.md) -- Thread list management\n- [.\u002Freferences\u002Fstate-hooks.md](.\u002Freferences\u002Fstate-hooks.md) -- State access hooks\n- [.\u002Freferences\u002Ftypes.md](.\u002Freferences\u002Ftypes.md) -- Type definitions\n\n## Runtime Hierarchy\n\n```\nAssistantRuntime\n├── ThreadListRuntime (thread management)\n│   ├── ThreadListItemRuntime (per-thread item)\n│   └── ...\n└── ThreadRuntime (current thread)\n    ├── ComposerRuntime (input state)\n    └── MessageRuntime[] (per-message)\n        └── MessagePartRuntime[] (per-content-part)\n```\n\n## State Access (Modern API)\n\n```tsx\nimport { useAui, useAuiState, useAuiEvent } from \"@assistant-ui\u002Freact\";\n\nfunction ChatControls() {\n  const api = useAui();\n  const messages = useAuiState(s => s.thread.messages);\n  const isRunning = useAuiState(s => s.thread.isRunning);\n\n  useAuiEvent(\"composer.send\", (e) => {\n    console.log(\"Sent in thread:\", e.threadId);\n  });\n\n  return (\n    \u003Cdiv>\n      \u003Cbutton onClick={() => api.thread().append({\n        role: \"user\",\n        content: [{ type: \"text\", text: \"Hello!\" }],\n      })}>\n        Send\n      \u003C\u002Fbutton>\n      {isRunning && (\n        \u003Cbutton onClick={() => api.thread().cancelRun()}>Cancel\u003C\u002Fbutton>\n      )}\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n## Thread Operations\n\n```tsx\nconst api = useAui();\nconst thread = api.thread();\n\n\u002F\u002F Append message\nthread.append({ role: \"user\", content: [{ type: \"text\", text: \"Hello\" }] });\n\n\u002F\u002F Cancel generation\nthread.cancelRun();\n\n\u002F\u002F Get current state\nconst state = thread.getState();  \u002F\u002F { messages, isRunning, ... }\n```\n\n## Message Operations\n\n```tsx\nconst message = api.thread().message(0);  \u002F\u002F By index\n\nmessage.edit({ role: \"user\", content: [{ type: \"text\", text: \"Updated\" }] });\nmessage.reload();\n```\n\n## Events\n\n```tsx\nuseAuiEvent(\"thread.runStart\", () => {});\nuseAuiEvent(\"thread.runEnd\", () => {});\nuseAuiEvent(\"composer.send\", ({ threadId }) => {\n  console.log(\"Sent in thread:\", threadId);\n});\nuseAuiEvent(\"thread.modelContextUpdate\", () => {});\n```\n\n## Capabilities\n\n```tsx\nconst caps = useAuiState(s => s.thread.capabilities);\n\u002F\u002F { cancel, edit, reload, copy, speak, attachments }\n```\n\n## Quick Reference\n\n```tsx\n\u002F\u002F Get messages\nconst messages = useAuiState(s => s.thread.messages);\n\n\u002F\u002F Check running state\nconst isRunning = useAuiState(s => s.thread.isRunning);\n\n\u002F\u002F Append message\napi.thread().append({ role: \"user\", content: [{ type: \"text\", text: \"Hi\" }] });\n\n\u002F\u002F Cancel generation\napi.thread().cancelRun();\n\n\u002F\u002F Edit message\napi.thread().message(index).edit({ ... });\n\n\u002F\u002F Reload message\napi.thread().message(index).reload();\n```\n\n## Common Gotchas\n\n**\"Cannot read property of undefined\"**\n- Ensure hooks are called inside `AssistantRuntimeProvider`\n\n**State not updating**\n- Use selectors with `useAuiState` to prevent unnecessary re-renders\n\n**Messages array empty**\n- Check runtime is configured\n- Verify API response format\n","# assistant-ui Runtime\n\n**Always consult [assistant-ui.com\u002Fllms.txt](https:\u002F\u002Fassistant-ui.com\u002Fllms.txt) for latest API.**\n\n## References\n\n- [.\u002Freferences\u002Flocal-runtime.md](.\u002Freferences\u002Flocal-runtime.md) -- useLocalRuntime deep dive\n- [.\u002Freferences\u002Fexternal-store.md](.\u002Freferences\u002Fexternal-store.md) -- useExternalStoreRuntime deep dive\n- [.\u002Freferences\u002Fthread-list.md](.\u002Freferences\u002Fthread-list.md) -- Thread list management\n- [.\u002Freferences\u002Fstate-hooks.md](.\u002Freferences\u002Fstate-hooks.md) -- State access hooks\n- [.\u002Freferences\u002Ftypes.md](.\u002Freferences\u002Ftypes.md) -- Type definitions\n\n## Runtime Hierarchy\n\n```\nAssistantRuntime\n├── ThreadListRuntime (thread management)\n│   ├── ThreadListItemRuntime (per-thread item)\n│   └── ...\n└── ThreadRuntime (current thread)\n    ├── ComposerRuntime (input state)\n    └── MessageRuntime[] (per-message)\n        └── MessagePartRuntime[] (per-content-part)\n```\n\n## State Access (Modern API)\n\n```tsx\nimport { useAui, useAuiState, useAuiEvent } from \"@assistant-ui\u002Freact\";\n\nfunction ChatControls() {\n  const api = useAui();\n  const messages = useAuiState(s => s.thread.messages);\n  const isRunning = useAuiState(s => s.thread.isRunning);\n\n  useAuiEvent(\"composer.send\", (e) => {\n    console.log(\"Sent in thread:\", e.threadId);\n  });\n\n  return (\n    \u003Cdiv>\n      \u003Cbutton onClick={() => api.thread().append({\n        role: \"user\",\n        content: [{ type: \"text\", text: \"Hello!\" }],\n      })}>\n        Send\n      \u003C\u002Fbutton>\n      {isRunning && (\n        \u003Cbutton onClick={() => api.thread().cancelRun()}>Cancel\u003C\u002Fbutton>\n      )}\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n## Thread Operations\n\n```tsx\nconst api = useAui();\nconst thread = api.thread();\n\n\u002F\u002F Append message\nthread.append({ role: \"user\", content: [{ type: \"text\", text: \"Hello\" }] });\n\n\u002F\u002F Cancel generation\nthread.cancelRun();\n\n\u002F\u002F Get current state\nconst state = thread.getState();  \u002F\u002F { messages, isRunning, ... }\n```\n\n## Message Operations\n\n```tsx\nconst message = api.thread().message(0);  \u002F\u002F By index\n\nmessage.edit({ role: \"user\", content: [{ type: \"text\", text: \"Updated\" }] });\nmessage.reload();\n```\n\n## Events\n\n```tsx\nuseAuiEvent(\"thread.runStart\", () => {});\nuseAuiEvent(\"thread.runEnd\", () => {});\nuseAuiEvent(\"composer.send\", ({ threadId }) => {\n  console.log(\"Sent in thread:\", threadId);\n});\nuseAuiEvent(\"thread.modelContextUpdate\", () => {});\n```\n\n## Capabilities\n\n```tsx\nconst caps = useAuiState(s => s.thread.capabilities);\n\u002F\u002F { cancel, edit, reload, copy, speak, attachments }\n```\n\n## Quick Reference\n\n```tsx\n\u002F\u002F Get messages\nconst messages = useAuiState(s => s.thread.messages);\n\n\u002F\u002F Check running state\nconst isRunning = useAuiState(s => s.thread.isRunning);\n\n\u002F\u002F Append message\napi.thread().append({ role: \"user\", content: [{ type: \"text\", text: \"Hi\" }] });\n\n\u002F\u002F Cancel generation\napi.thread().cancelRun();\n\n\u002F\u002F Edit message\napi.thread().message(index).edit({ ... });\n\n\u002F\u002F Reload message\napi.thread().message(index).reload();\n```\n\n## Common Gotchas\n\n**\"Cannot read property of undefined\"**\n- Ensure hooks are called inside `AssistantRuntimeProvider`\n\n**State not updating**\n- Use selectors with `useAuiState` to prevent unnecessary re-renders\n\n**Messages array empty**\n- Check runtime is configured\n- Verify API response format\n",{"name":5,"license":14,"version":38,"description":7},"0.0.1","master","48a57981043dbb2c534a27f410715a205f50bcfb",".claude\u002Fskills\u002Fruntime",2,"https:\u002F\u002Fgithub.com\u002FAkaraChen\u002Fangel-engine","https:\u002F\u002Fangel-engine.vercel.app\u002F","https:\u002F\u002Fgithub.com\u002FAkaraChen","https:\u002F\u002Fakr.moe","button painter, string concatenator, log alchemist.\r\n\r\nNo slop, no lag.","2026-09-09 08:58:26",{"source":8,"skillName":5,"commands":50,"prompt":60,"zipAvailable":61},[51,54,57],{"tool":52,"command":53},"npx","npx skills add AkaraChen\u002Fangel-engine --skill runtime",{"tool":55,"command":56},"bunx","bunx skills add AkaraChen\u002Fangel-engine --skill runtime",{"tool":58,"command":59},"pnpm","pnpm dlx skills add AkaraChen\u002Fangel-engine --skill runtime","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FAkaraChen\u002Fangel-engine\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Fruntime\u002FSKILL.md",true,[63,69,73,77,81],{"path":64,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":67,"sourceHtmlUrl":68},"references\u002Fexternal-store.md","REFERENCE","参考文档",7515,"https:\u002F\u002Fgithub.com\u002FAkaraChen\u002Fangel-engine\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Fruntime\u002Freferences\u002Fexternal-store.md",{"path":70,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":71,"sourceHtmlUrl":72},"references\u002Flocal-runtime.md",6524,"https:\u002F\u002Fgithub.com\u002FAkaraChen\u002Fangel-engine\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Fruntime\u002Freferences\u002Flocal-runtime.md",{"path":74,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":75,"sourceHtmlUrl":76},"references\u002Fstate-hooks.md",6214,"https:\u002F\u002Fgithub.com\u002FAkaraChen\u002Fangel-engine\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Fruntime\u002Freferences\u002Fstate-hooks.md",{"path":78,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":79,"sourceHtmlUrl":80},"references\u002Fthread-list.md",7325,"https:\u002F\u002Fgithub.com\u002FAkaraChen\u002Fangel-engine\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Fruntime\u002Freferences\u002Fthread-list.md",{"path":82,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":83,"sourceHtmlUrl":84},"references\u002Ftypes.md",3810,"https:\u002F\u002Fgithub.com\u002FAkaraChen\u002Fangel-engine\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Fruntime\u002Freferences\u002Ftypes.md",[86,98,121,135,148,163],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":33},"01M71V8NX6JM9719CJM1R07JNF","update","Update assistant-ui and AI SDK to latest versions. Detects current versions, identifies breaking changes, and executes migrations.","https:\u002F\u002Fgithub.com\u002FAkaraChen\u002Fangel-engine\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Fupdate\u002FSKILL.md",[],[88,93,94,95,96,21,97,18],"changes","latest","migrations","ai sdk","sdk",{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":109,"publishedAt":33},"01M71V8GA53EWDYMKDCE95JN9M","tools","Guide for tool registration and tool UI in assistant-ui. Use when implementing LLM tools, tool call rendering, or human-in-the-loop patterns.","https:\u002F\u002Fgithub.com\u002FAkaraChen\u002Fangel-engine\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Ftools\u002FSKILL.md",[104],{"categoryNo":105,"categoryName":106,"taxonomyType":107,"taxonomyTypeDesc":108},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",[110,111,25,112,21,18,113,32,30,114,115,116,117,118,119,120,26],"Tools","loop","human-in-the-loop","implementing","tool","rendering","human","llm tools","call","patterns","registration",{"skillNo":122,"name":123,"nameZh":6,"description":124,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":125,"categories":126,"keywords":127,"publishedAt":33},"01M71V8EK5HG1TY1JSJA9ZG6RA","thread-list","Guide for multi-thread management in assistant-ui. Use when implementing thread lists, switching threads, or managing conversation history.","https:\u002F\u002Fgithub.com\u002FAkaraChen\u002Fangel-engine\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Fthread-list\u002FSKILL.md",[],[128,129,31,32,30,113,130,131,132,133,26,25,24,21,18,134],"list","thread list","threads","multi","switching","conversation","history",{"skillNo":136,"name":137,"nameZh":6,"description":138,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":139,"categories":140,"keywords":141,"publishedAt":33},"01M71V8CQ30TTQP2KHPYCGCR3R","streaming","Guide for assistant-stream package and streaming protocols. Use when implementing streaming backends, custom protocols, or debugging stream issues.","https:\u002F\u002Fgithub.com\u002FAkaraChen\u002Fangel-engine\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Fstreaming\u002FSKILL.md",[],[137,142,32,143,144,30,113,26,25,145,146,147,18],"protocols","custom","stream","package","issues","debugging",{"skillNo":149,"name":150,"nameZh":6,"description":151,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":152,"categories":153,"keywords":154,"publishedAt":33},"01M71V86CFGGT33XS5FCVAYPVG","setup","Setup and configure assistant-ui in a project. Use when installing packages, configuring runtimes, setting up chat UI, or troubleshooting setup issues.","https:\u002F\u002Fgithub.com\u002FAkaraChen\u002Fangel-engine\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Fsetup\u002FSKILL.md",[],[150,155,156,26,157,158,21,146,159,18,160,161,32,162,28],"chat","up","troubleshooting","configure","packages","project","setting","chat ui",{"skillNo":164,"name":165,"nameZh":6,"description":166,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":167,"categories":168,"keywords":169,"publishedAt":33},"01M71V82YXWTCQS0M06D2HK4C4","primitives","Guide for assistant-ui UI primitives - ThreadPrimitive, ComposerPrimitive, MessagePrimitive. Use when customizing chat UI components.","https:\u002F\u002Fgithub.com\u002FAkaraChen\u002Fangel-engine\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Fprimitives\u002FSKILL.md",[],[165,32,30,162,170,155,26,25,21,171,18],"ui components","components"]