feat: Error if graph can not connect

This commit is contained in:
bracesproul
2025-03-11 10:21:21 -07:00
parent b326230d52
commit fa9c26aa31
5 changed files with 56 additions and 9 deletions

View File

@@ -337,7 +337,7 @@ export function InboxItemInput({
(Array.isArray(change) && !Array.isArray(key)) ||
(!Array.isArray(change) && Array.isArray(key))
) {
toast("Error", {
toast.error("Error", {
description: "Something went wrong",
richColors: true,
closeButton: true,

View File

@@ -85,7 +85,7 @@ export function ThreadActionsView({
const handleOpenInStudio = () => {
if (!apiUrl) {
toast("Error", {
toast.error("Error", {
description: "Please set the LangGraph deployment URL in settings.",
duration: 5000,
richColors: true,

View File

@@ -110,7 +110,7 @@ export default function useInterruptedActions({
) => {
e.preventDefault();
if (!humanResponse) {
toast("Error", {
toast.error("Error", {
description: "Please enter a response.",
duration: 5000,
richColors: true,
@@ -159,7 +159,7 @@ export default function useInterruptedActions({
(r) => r.type === selectedSubmitType,
);
if (!input) {
toast("Error", {
toast.error("Error", {
description: "No response found.",
richColors: true,
closeButton: true,
@@ -189,7 +189,7 @@ export default function useInterruptedActions({
console.error("Error sending human response", e);
if ("message" in e && e.message.includes("Invalid assistant ID")) {
toast("Error: Invalid assistant ID", {
toast.error("Error: Invalid assistant ID", {
description:
"The provided assistant ID was not found in this graph. Please update the assistant ID in the settings and try again.",
richColors: true,
@@ -197,7 +197,7 @@ export default function useInterruptedActions({
duration: 5000,
});
} else {
toast("Error", {
toast.error("Error", {
description: "Failed to submit response.",
richColors: true,
closeButton: true,
@@ -234,7 +234,7 @@ export default function useInterruptedActions({
const ignoreResponse = humanResponse.find((r) => r.type === "ignore");
if (!ignoreResponse) {
toast("Error", {
toast.error("Error", {
description: "The selected thread does not support ignoring.",
duration: 5000,
});
@@ -284,7 +284,7 @@ export default function useInterruptedActions({
});
} catch (e) {
console.error("Error marking thread as resolved", e);
toast("Error", {
toast.error("Error", {
description: "Failed to mark thread as resolved.",
richColors: true,
closeButton: true,