Skip to content

Commit b7b67e7

Browse files
committed
fix #7719 -- Rewording for "Pick an Example" when AI Generating Jupyter Notebooks
- also fix some UI inconsistency
1 parent a9f5bb1 commit b7b67e7

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

src/packages/frontend/editors/slate/upload.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export default function useUpload(
105105
event_handlers={updloadEventHandlers}
106106
style={{ height: "100%", width: "100%" }}
107107
dropzone_ref={dropzoneRef}
108-
show_upload={false}
108+
show_upload={true}
109109
>
110110
{body}
111111
</FileUploadWrapper>

src/packages/frontend/project/page/home-page/ai-generate-document.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,6 @@ function AIGenerateDocument({
741741
}
742742

743743
function renderDialog() {
744-
const empty = prompt.trim() == "";
745744
return (
746745
<>
747746
<Paragraph strong>
@@ -754,7 +753,7 @@ function AIGenerateDocument({
754753
/>
755754
</Paragraph>
756755
{renderJupyterKernelSelector()}
757-
<Paragraph type={empty ? "danger" : undefined}>
756+
<Paragraph>
758757
Provide a detailed description of the {docName} document you want to
759758
create:
760759
</Paragraph>
@@ -767,7 +766,6 @@ function AIGenerateDocument({
767766
placeholder={PLACEHOLDER}
768767
value={prompt}
769768
disabled={querying}
770-
status={empty ? "error" : undefined}
771769
onChange={({ target: { value } }) => setPrompt(value)}
772770
onPressEnter={(e) => {
773771
if (e.shiftKey) {
@@ -899,7 +897,7 @@ function AIGenerateDocument({
899897
setPreview(null);
900898
}}
901899
>
902-
<Icon name="arrow-left" /> Discard
900+
Cancel
903901
</Button>
904902
<Button
905903
type="primary"

src/packages/frontend/project/page/home-page/ai-generate-examples.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ type Language = "python" | "r" | "sagemath" | "octave" | "julia";
77

88
export const EXAMPLES_COMMON: readonly Example[] = [
99
[
10-
"Help me Studying ...",
10+
"Help me Study...",
1111
"I am a student. I want to learn more about a topic. Explain it to me using code, formulas and plots!\n\nTopic: DESCRIBE_TOPIC_HERE",
1212
["student", "learning"],
1313
],

0 commit comments

Comments
 (0)