-
Notifications
You must be signed in to change notification settings - Fork 428
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NEB-71] Nebula: Update example prompts (#5957)
<!-- start pr-codex --> ## PR-Codex overview This PR introduces a new type `ExamplePrompt` and a list of example prompts in `examplePrompts.ts`. It replaces hardcoded example prompts in `EmptyStateChatPageContent.tsx` with a dynamic mapping from the newly created `examplePrompts`, enhancing maintainability and readability. ### Detailed summary - Added type `ExamplePrompt` with `title` and `message` properties. - Created `examplePrompts` array containing several example prompts. - Refactored `EmptyStateChatPageContent.tsx` to dynamically render `ExamplePrompt` components using `examplePrompts`. - Removed hardcoded example prompts from `EmptyStateChatPageContent.tsx`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
- Loading branch information
Showing
2 changed files
with
43 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
apps/dashboard/src/app/nebula-app/(app)/data/examplePrompts.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
type ExamplePrompt = { | ||
title: string; | ||
message: string; | ||
}; | ||
|
||
// Note: | ||
// Keep the title as short as possible so 2 of them can fit in a single row on desktop viewport | ||
// title is only used for displaying the example - the `message` is sent to server when user clicks on the example - it can be as long and descriptive as needed | ||
|
||
export const examplePrompts: ExamplePrompt[] = [ | ||
{ | ||
title: "Deploy an ERC-20 Token", | ||
message: | ||
"Deploy an ERC-20 Token with name 'Hello World', description 'Hello world token deployed by Nebula', and symbol 'HELLO'", | ||
}, | ||
{ | ||
title: "USDC contract address on Ethereum", | ||
message: "What is the USDC contract address on Ethereum?", | ||
}, | ||
{ | ||
title: "Analyze WETH smart contract", | ||
message: "Analyze 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 on ethereum", | ||
}, | ||
{ | ||
title: "Transfer 0.001 ETH to thirdweb.eth", | ||
message: "Transfer 0.001 ETH to thirdweb.eth", | ||
}, | ||
{ | ||
title: "Using session keys in Unity", | ||
message: "How to use session key in Unity?", | ||
}, | ||
]; |