-
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.
* add accordion item for creating custom source items * add shadcn-card component * wip: add form for custom user source * cleanup custom source componentn * add shadcn input component * add components to get custom source by website url and copy/paste * add logic for extracting pdf and page content from url * wip: add component for rendering pdf content * define id field on URLContent * fetch custom sources from specified links - supports .pdf and any public webpage * retain formatting in web and pdf content; improve page content rendering * cleanup * wip: add logic to store and fetch custom sources * add endpoint to fetch custom sources for a given audiocast session * create a component for rendering audio_souces - ai-generated custom * setup firebase and rxjs * add a safe_to_dict method to db_manager * use generate-custom-source endpoint when adding custom source - this allows saving the custom source to firestore * fetch custom sources on mount page/drawer * read custom_sources from firebase using the js_sdk * add firebase.json and optimize_deps * parse firebase_config env variable in vite.config * define .firebaserc * update custom_source model; add toast notification * consolidate and cleanup * wip: create workflow to store copy/paste source * add useful helpers to CustomSourceManager * add endpoint and request logic to add copy/paste source * improve the layouts of copypast_source and website_url_source forms * refactor and cleanup * use improved module names * finalize endpoint to store uploaded content * improve class and module names * add ui logic for uploading dropped files * upload dragged&dropped file as form_data; allow up to 10mb * add a title field on source_content model * ensure the user cannot create more than 5 custom sources * allow uploading a file using the file dialog * cleanup * write source_content to db after it's generated * add user provided custom sources to the tts_prompt * specify the correct interface for _get_custom_sources * improve the prompt to exclude extraneous information in user-provided sources * add FIREBASE_CONFIG to env * remove firebase_config from env_vars * create and expose a sesion_model observable * render session info when generating the audiocast * annonate user specified audiocast type with the category * update session metadata directly outside of background_task
- Loading branch information
1 parent
f278a2d
commit 293743a
Showing
14 changed files
with
112 additions
and
70 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
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,16 @@ | ||
<script lang="ts"> | ||
import type { SessionModel } from '@/utils/types'; | ||
export let session: SessionModel; | ||
</script> | ||
|
||
<div class="flex w-full px-4 flex-col gap-y-3 sm:max-w-xl lg:max-w-3xl max-w-full"> | ||
<div class="mb-4 flex flex-col gap-y-2"> | ||
<span class="capitalize bg-gray-800 text-gray-300 w-fit py-1 px-3 rounded-md"> | ||
{session.category} | ||
</span> | ||
|
||
{#if session.metadata?.title} | ||
<h1 class="text-2xl font-semibold text-sky-200">{session.metadata.title}</h1> | ||
{/if} | ||
</div> | ||
</div> |
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,17 @@ | ||
import type { DocumentReference } from 'firebase/firestore'; | ||
import { distinctUntilChanged, shareReplay, of, catchError, switchMap, startWith } from 'rxjs'; | ||
import { equals } from 'ramda'; | ||
import { dbRefs } from '@/services/firebase'; | ||
import { docData } from './db.utils'; | ||
import type { SessionModel } from '@/utils/types'; | ||
|
||
export const getSession$ = (sessionId: string) => { | ||
const ref = dbRefs.docRef('audiora_sessions', sessionId) as DocumentReference<SessionModel>; | ||
return docData(ref).pipe( | ||
switchMap((v) => of(v)), | ||
distinctUntilChanged((a, b) => equals(a, b)), | ||
shareReplay(1), | ||
catchError(() => of(null)), | ||
startWith(null) | ||
); | ||
}; |
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
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