-
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 pull request #11 from hinagiku-dev/fix
Fix
- Loading branch information
Showing
36 changed files
with
958 additions
and
736 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
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,9 @@ | ||
import { z } from 'zod'; | ||
import { Timestamp } from 'firebase/firestore'; | ||
|
||
export const CodeSchema = z.object({ | ||
target: z.string().min(1), | ||
exp: z.instanceof(Timestamp), | ||
}); | ||
|
||
export type Code = z.infer<typeof CodeSchema>; |
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,12 @@ | ||
import { z } from 'zod'; | ||
|
||
export const ConversationSchema = z.object({ | ||
history: z.array( | ||
z.object({ | ||
role: z.enum(['system', 'user', 'assistant']), | ||
content: z.string(), | ||
}) | ||
), | ||
}); | ||
|
||
export type Conversation = z.infer<typeof ConversationSchema>; |
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,15 @@ | ||
import { z } from 'zod'; | ||
|
||
export const GroupSchema = z.object({ | ||
concept: z.string().min(1), | ||
discussions: z.array( | ||
z.object({ | ||
content: z.string(), | ||
id: z.string().nullable(), | ||
}) | ||
), | ||
summary: z.string().nullable(), | ||
keywords: z.record(z.string(), z.number()), | ||
}); | ||
|
||
export type Group = z.infer<typeof GroupSchema>; |
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,12 @@ | ||
import { Timestamp } from 'firebase/firestore'; | ||
import { z } from 'zod'; | ||
|
||
export const ProfileSchema = z.object({ | ||
uid: z.string(), | ||
displayName: z.string(), | ||
title: z.string().nullable(), | ||
bio: z.string().nullable(), | ||
updatedAt: z.instanceof(Timestamp) | ||
}); | ||
|
||
export type Profile = z.infer<typeof ProfileSchema>; |
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,27 @@ | ||
import { z } from 'zod'; | ||
import { Timestamp } from 'firebase/firestore'; | ||
|
||
export const SessionSchema = z.object({ | ||
title: z.string().min(1).max(200), | ||
status: z.enum(['draft', 'waiting', 'active', 'ended']), | ||
host: z.string(), | ||
participants: z.array(z.string()), | ||
group: z.record(z.string(), z.string()), | ||
resources: z.array( | ||
z.object({ | ||
name: z.string(), | ||
content: z.string().min(1), | ||
createdAt: z.instanceof(Timestamp), | ||
id: z.string().nullable(), | ||
}) | ||
).max(10), | ||
task: z.string().min(1).max(200), | ||
subtasks: z.array(z.string().min(1).max(200)).max(10), | ||
timing: z.object({ | ||
self: z.number().int().min(1), | ||
group: z.number().int().min(1), | ||
}), | ||
createdAt: z.instanceof(Timestamp), | ||
}); | ||
|
||
export type Session = z.infer<typeof SessionSchema>; |
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,5 @@ | ||
export async function parsePdf2Text(filePath: string): Promise<string> { | ||
// TODO: pares pdf file to text | ||
|
||
return filePath; | ||
} |
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 { writable } from 'svelte/store'; | ||
|
||
export const sidebarOpen = writable(false); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.