Files
Suhas Deshpande d5ee8c89a0 Pre/1.4.1 (#1054)
* fixes `InProgressStateWait` interface (#1040)

interface InProgressStateWait<T extends Parameter[] | [] = []> {
    status: "inProgress";
    args: Partial<MappedParameterTypes<T>>;
    /** @deprecated use respond instead */
    handler: undefined;
    respond: undefined; // missed somehow in earlier change
    result: undefined;
}

* Update index.ts (#1041)

* Fix issues with the quickstart (#1047)

* deprecate disabled, add "available" (#1016)

* Pre release pre/1.4.1

* run prerelease on pre/*

* Pre release pre/1.4.1

* feat: surface Copilot Cloud errors in debug mode (#1057)

* feat(react-core): toast for Cloud

* use hook instead of constructor for runtime client

* fix formatting

* fix type issues

* fix odd typo

* copilo cloud copilotkit provider: remove use client, and reference layout.tsx

* per install path dependency installation

* fix self hosting quickstart instruction, to mimick what we have in SelfHostingCopilotRuntimeConfigureCopilotKitProvider

* .

* highlight npx command

* find your copilot runtime: instructions update

* llm adapters: add quickstart code snippets

* remove unneeded section

* add steps to self-hosting

* fix legit docs issue that came out of nowhere

* remove llm adadpters reference which seems to break stuff

* fix assistant message css when not using tailwind (#1048)

* Fix frontend tool definitions in LangGraph state (WIP) (#1053)

* Pre release mme/frontend-tool-docs

* update packages

* move convertJsonSchemaToZodSchema to shared and add test code

* exit pre

* Pre release mme/frontend-tool-docs

* implement convertActionsToDynamicStructuredTools

* Pre release mme/frontend-tool-docs

* pass frontend function to LangGraph JS

* remove console.log

* exit pre

* Pre release pre/1.4.1

* fix(ci): remove typescript step from quality, we run build anyway

* exit pre mode

* Release 1.4.1

---------

Co-authored-by: Markus Ecker <markus.ecker@gmail.com>
Co-authored-by: Ariel Weinberger <weinberger.ariel@gmail.com>
Co-authored-by: Atai Barkai <atai.barkai@gmail.com>
2024-12-10 10:47:36 -06:00

35 lines
910 B
TypeScript

"use client";
import { useCopilotAction } from "@copilotkit/react-core";
import { CopilotPopup } from "@copilotkit/react-ui";
export function WaitForUserInput() {
useCopilotAction({
name: "AskHuman",
available: "remote",
parameters: [
{
name: "question",
},
],
handler: async ({ question }) => {
return window.prompt(question);
},
});
return (
<div className="flex flex-col items-center justify-center h-screen">
<div className="text-2xl">LangGraph Wait For User Input Example</div>
<div className="text-xs">
(https://langchain-ai.github.io/langgraph/how-tos/human_in_the_loop/wait-user-input/#agent)
</div>
<div>
Use the search tool to ask the user where they are, then look up the
weather there
</div>
<CopilotPopup defaultOpen={true} clickOutsideToClose={false} />
</div>
);
}