-
Notifications
You must be signed in to change notification settings - Fork 0
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/stream_error_handling
- Loading branch information
Showing
102 changed files
with
2,727 additions
and
1,783 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: "Chromatic" | ||
|
||
on: push | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }}-chromatic | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
changed-files: | ||
runs-on: ubuntu-latest | ||
name: changed-files | ||
outputs: | ||
all_changed_files: ${{ steps.changed-files.outputs.all_changed_files }} | ||
any_changed: ${{ steps.changed-files.outputs.any_changed }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Get changed files | ||
id: changed-files | ||
uses: tj-actions/changed-files@v44 | ||
with: | ||
files: | | ||
apps/nextjs/** | ||
chromatic: | ||
name: Run Chromatic | ||
needs: [changed-files] | ||
if: ${{ needs.changed-files.outputs.any_changed == 'true' }} | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v3 | ||
with: | ||
version: 8 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: "pnpm" | ||
- name: Install dependencies | ||
run: pnpm install | ||
- name: Inject Doppler env vars | ||
uses: dopplerhq/[email protected] | ||
id: doppler | ||
with: | ||
doppler-token: ${{ secrets.DOPPLER_TOKEN }} | ||
inject-env-vars: true | ||
- name: Run Chromatic | ||
uses: chromaui/action@latest | ||
with: | ||
workingDir: apps/nextjs | ||
exitZeroOnChanges: true | ||
exitOnceUploaded: true | ||
onlyChanged: true |
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 was deleted.
Oops, something went wrong.
3 changes: 1 addition & 2 deletions
3
apps/nextjs/.storybook/ThemeDecorator.tsx → ...rybook/decorators/RadixThemeDecorator.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
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
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,6 @@ | ||
{ | ||
"onlyChanged": true, | ||
"projectId": "Project:672908473f629875f0be294f", | ||
"storybookBaseDir": "apps/nextjs", | ||
"zip": true | ||
} |
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", | ||
}, | ||
}, | ||
}; |
Oops, something went wrong.