Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/dashboard/src/@/constants/public-envs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const NEXT_PUBLIC_DEMO_ENGINE_URL =
process.env.NEXT_PUBLIC_DEMO_ENGINE_URL || "";

export const NEXT_PUBLIC_THIRDWEB_AI_HOST =
process.env.NEXT_PUBLIC_THIRDWEB_AI_HOST || "https://nebula-api.thirdweb.com";
process.env.NEXT_PUBLIC_THIRDWEB_AI_HOST || "https://api.thirdweb.com/ai";

export const NEXT_PUBLIC_BRIDGE_PAGE_CLIENT_ID =
process.env.NEXT_PUBLIC_BRIDGE_PAGE_CLIENT_ID;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,22 @@ export async function promptNebula(params: {
project: Project;
}) {
const body: Record<string, string | boolean | object> = {
context: {
chain_ids: params.context?.chainIds || [],
from: params.context?.walletAddress,
networks: params.context?.networks,
session_id: params.sessionId,
},
messages: [params.message],
session_id: params.sessionId,
stream: true,
};

if (params.context) {
body.context = {
chain_ids: params.context.chainIds || [],
networks: params.context.networks,
wallet_address: params.context.walletAddress,
};
}

try {
const events = await stream(`${NEXT_PUBLIC_THIRDWEB_AI_HOST}/chat`, {
body: JSON.stringify(body),
headers: {
Authorization: `Bearer ${params.authToken}`,
"x-team-id": params.project.teamId,
"x-thirdweb-team-id": params.project.teamId,
"x-client-id": params.project.publishableKey,
"Content-Type": "application/json",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export async function fetchWithAuthToken(options: FetchWithKeyOptions) {
headers: {
Accept: "application/json",
Authorization: `Bearer ${authToken}`,
"x-team-id": options.project.teamId,
"x-thirdweb-team-id": options.project.teamId,
"x-client-id": options.project.publishableKey,
"Content-Type": "application/json",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ export default function RotateAdminKeyButton(props: {
// The confirm checkbox is the only way out of this dialog, and closing it
// discards the response. Require the keys to actually leave the screen
// first: a download, or a copy of both values.
const keysCaptured =
keysDownloaded || (adminKeyCopied && accessTokenCopied);
const keysCaptured = keysDownloaded || (adminKeyCopied && accessTokenCopied);

const closeBlocked =
rotateAdminKeyMutation.isPending || (!!ejectedKeys && !keysConfirmed);
Expand Down
Loading