Files
paseo/plugin-examples/inline-thinking/index.ts
Mohamed Boudra e34aea206e feat(plugins): add live timeline rows and client slash commands
Plugins can transform live timeline source items at render time, append durable plugin rows from daemon handlers, and register client-only slash commands in the composer.

Related to #3940 and #3952.
2026-09-02 13:12:09 +02:00

27 lines
682 B
TypeScript

import type { PluginContext } from "@getpaseo/plugin";
import { InlineThinking, inlineThinkingSchema } from "./thinking.client";
export default function contribute(plugin: PluginContext) {
plugin.addTimelineTransformer({
id: "inline-thinking",
query: { itemType: "reasoning" },
transform: ({ item, phase }) => ({
items: [
{
type: "plugin",
kind: "inline-thinking",
version: 1,
data: { text: item.text, phase },
},
],
}),
});
plugin.addTimelineRenderer({
kind: "inline-thinking",
version: 1,
schema: inlineThinkingSchema,
Component: InlineThinking,
});
return () => {};
}