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.
12 lines
473 B
TypeScript
12 lines
473 B
TypeScript
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);
|
|
}
|