mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-22 01:02:41 +00:00
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.
27 lines
682 B
TypeScript
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 () => {};
|
|
}
|