Merge pull request #12 from langchain-ai/brace/thread-history

feat: Add thread history sheet
This commit is contained in:
Brace Sproul
2025-03-04 11:04:17 -08:00
committed by GitHub
10 changed files with 4459 additions and 2123 deletions

View File

@@ -12,6 +12,7 @@ import { LangGraphLogoSVG } from "@/components/icons/langgraph";
import { Label } from "@/components/ui/label";
import { ArrowRight } from "lucide-react";
import { PasswordInput } from "@/components/ui/password-input";
import { getApiKey } from "@/lib/api-key";
const useTypedStream = useStream<
{ messages: Message[]; ui?: UIMessage[] },
@@ -59,13 +60,7 @@ export const StreamProvider: React.FC<{ children: ReactNode }> = ({
}) => {
const [apiUrl, setApiUrl] = useQueryParam("apiUrl", StringParam);
const [apiKey, _setApiKey] = useState(() => {
try {
const key = window.localStorage.getItem("lg:chat:apiKey");
return key || null;
} catch {
// pass
}
return null;
return getApiKey();
});
const setApiKey = (key: string) => {