feat(plugins): split plugin code by runtime
Keep the entry point focused on contribution wiring so client UI and daemon handlers can use their own runtime APIs safely. Surface compilation failures and lifecycle transitions in the retained plugin log tail.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import type { PluginAttachmentSearchPayload } from "@paseo/plugin";
|
||||
import type { output as ZodOutput } from "zod";
|
||||
import { searchIssuesRpc } from "./issues.shared";
|
||||
import { createLinearIssueSearch } from "./linear";
|
||||
|
||||
export async function searchIssues({
|
||||
query,
|
||||
}: ZodOutput<typeof searchIssuesRpc.input>): Promise<PluginAttachmentSearchPayload> {
|
||||
const linear = createLinearIssueSearch({ apiKey: process.env.LINEAR_API_KEY ?? "" });
|
||||
return linear.search(query);
|
||||
}
|
||||
Reference in New Issue
Block a user