-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix/delete-all-button
- Loading branch information
Showing
13 changed files
with
195 additions
and
16 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
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
@import "../src/app/globals.css"; | ||
@import "../src/app/theme-config.css"; | ||
@import "../../../node_modules/@radix-ui/themes/styles.css"; |
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
68 changes: 68 additions & 0 deletions
68
apps/nextjs/src/app/aila/[id]/download/DownloadView.stories.tsx
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,68 @@ | ||
import type { AilaPersistedChat } from "@oakai/aila/src/protocol/schema"; | ||
import type { Meta, StoryObj } from "@storybook/react"; | ||
|
||
import { DemoProvider } from "../../../../../src/components/ContextProviders/Demo"; | ||
import { DownloadContent } from "./DownloadView"; | ||
|
||
const meta: Meta<typeof DownloadContent> = { | ||
title: "Pages/Chat/Download", | ||
component: DownloadContent, | ||
parameters: { | ||
layout: "fullscreen", | ||
}, | ||
decorators: [ | ||
(Story) => ( | ||
<DemoProvider> | ||
<Story /> | ||
</DemoProvider> | ||
), | ||
], | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof DownloadContent>; | ||
|
||
const chat: AilaPersistedChat = { | ||
id: "nSLmbQ1LO75zLTcA", | ||
path: "/aila/nSLmbQ1LO75zLTcA", | ||
title: "The End of Roman Britain", | ||
userId: "user_2nQuq4jFWLfo4w1WNA6xEBp93IY", | ||
lessonPlan: { | ||
title: "The End of Roman Britain", | ||
subject: "history", | ||
keyStage: "key-stage-3", | ||
learningOutcome: | ||
"I can explain the factors leading to the end of Roman rule in Britain and its impact on society.", | ||
learningCycles: [ | ||
"Identify the key factors that led to the exit of the Romans from Britain.", | ||
"Discuss the immediate social and economic impacts of the Roman departure on Britain.", | ||
"Explore how archaeologists have uncovered evidence of the Roman era in Britain.", | ||
], | ||
}, | ||
relevantLessons: [], | ||
createdAt: 1732008272042, | ||
updatedAt: 1732008303927, | ||
iteration: 2, | ||
messages: [ | ||
{ | ||
id: "u-Mksqgrrlq7-02EvL", | ||
content: | ||
"Create a lesson plan about The End of Roman Britain for Key Stage 3 History", | ||
role: "user", | ||
}, | ||
{ | ||
id: "a-ttJ8OIwaxn4aFEOq", | ||
content: | ||
'{"type":"llmMessage","sectionsToEdit":["learningOutcome","learningCycles"],"patches":[{"type":"patch","reasoning":"Creating a new lesson plan from scratch as no existing Oak lessons are available for this topic. Setting a clear learning outcome and defining the learning cycles to structure the lesson effectively.","value":{"type":"string","op":"add","path":"/learningOutcome","value":"I can explain the factors leading to the end of Roman rule in Britain and its impact on society."},"status":"complete"},{"type":"patch","reasoning":"Outlining the learning cycles to provide a structured approach to teaching the factors leading to the end of Roman Britain, the immediate effects, and the archaeological evidence.","value":{"type":"string-array","op":"add","path":"/learningCycles","value":["Identify the key factors that led to the exit of the Romans from Britain.","Discuss the immediate social and economic impacts of the Roman departure on Britain.","Explore how archaeologists have uncovered evidence of the Roman era in Britain."]},"status":"complete"}],"sectionsEdited":["learningOutcome","learningCycles"],"prompt":{"type":"text","value":"Are the learning outcome and learning cycles appropriate for your pupils? If not, suggest an edit. Otherwise, tap **Continue** to move on to the next step."},"status":"complete"}', | ||
role: "assistant", | ||
}, | ||
], | ||
subject: "history", | ||
keyStage: "key-stage-3", | ||
}; | ||
|
||
export const Default: Story = { | ||
args: { | ||
chat, | ||
}, | ||
}; |
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
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,40 @@ | ||
import type { LooseLessonPlan } from "@oakai/aila/src/protocol/schema"; | ||
import type { Meta, StoryObj } from "@storybook/react"; | ||
|
||
import ShareChat from "./"; | ||
|
||
const meta: Meta<typeof ShareChat> = { | ||
title: "Pages/Chat/Share", | ||
component: ShareChat, | ||
parameters: { | ||
layout: "fullscreen", | ||
}, | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof ShareChat>; | ||
|
||
const lessonPlan: LooseLessonPlan = { | ||
title: "The End of Roman Britain", | ||
subject: "history", | ||
keyStage: "key-stage-3", | ||
learningOutcome: | ||
"I can explain the factors leading to the end of Roman rule in Britain and its impact on society.", | ||
learningCycles: [ | ||
"Identify the key factors that led to the exit of the Romans from Britain.", | ||
"Discuss the immediate social and economic impacts of the Roman departure on Britain.", | ||
"Explore how archaeologists have uncovered evidence of the Roman era in Britain.", | ||
], | ||
}; | ||
|
||
export const Default: Story = { | ||
args: { | ||
lessonPlan, | ||
creatorsName: "Mr Teacher", | ||
moderation: { | ||
id: "mock-moderation-id", | ||
categories: ["l/strong-language"], | ||
justification: "Mock sensitive result", | ||
}, | ||
}, | ||
}; |
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,28 @@ | ||
import type { Meta, StoryObj } from "@storybook/react"; | ||
|
||
import { DemoProvider } from "@/components/ContextProviders/Demo"; | ||
|
||
import { HelpContent } from "."; | ||
|
||
const meta: Meta<typeof HelpContent> = { | ||
title: "Pages/Chat/Help", | ||
component: HelpContent, | ||
parameters: { | ||
// Including custom decorators changes the layout from fullscreen | ||
layout: "fullscreen", | ||
}, | ||
decorators: [ | ||
(Story) => ( | ||
<DemoProvider> | ||
<Story /> | ||
</DemoProvider> | ||
), | ||
], | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof HelpContent>; | ||
|
||
export const Default: Story = { | ||
args: {}, | ||
}; |
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
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
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
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
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
31 changes: 31 additions & 0 deletions
31
apps/nextjs/src/components/AppComponents/Chat/chat-start.stories.tsx
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,31 @@ | ||
import type { Meta, StoryObj } from "@storybook/react"; | ||
|
||
import { DemoProvider } from "@/components/ContextProviders/Demo"; | ||
|
||
import { DialogProvider } from "../DialogContext"; | ||
import { ChatStart } from "./chat-start"; | ||
|
||
const meta: Meta<typeof ChatStart> = { | ||
title: "Pages/Chat/Chat Start", | ||
component: ChatStart, | ||
parameters: { | ||
// Including custom decorators changes the layout from fullscreen | ||
layout: "fullscreen", | ||
}, | ||
decorators: [ | ||
(Story) => ( | ||
<DialogProvider> | ||
<DemoProvider> | ||
<Story /> | ||
</DemoProvider> | ||
</DialogProvider> | ||
), | ||
], | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof ChatStart>; | ||
|
||
export const Default: Story = { | ||
args: {}, | ||
}; |