Skip to content

Commit

Permalink
hide chatbox on the home page
Browse files Browse the repository at this point in the history
  • Loading branch information
nwaughachukwuma committed Dec 5, 2024
1 parent 6b2767a commit d94cc60
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 16 deletions.
26 changes: 14 additions & 12 deletions app/src/lib/components/ChatContainer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,18 @@
</div>
</div>

{#if !hasFinalResponse && !$sessionCompleted$ && !$fetchingSource$ && !$audioSource$}
<div class="shrink-0 w-full sm:max-w-xl lg:max-w-3xl max-w-full max-sm:px-4 px-1 py-4">
<ChatBoxContainer
bind:searchTerm
loading={navLoading}
showIcon
disabled={$sessionCompleted$ || disableTextInput}
on:keypress
on:click
/>
</div>
{/if}
<slot name="chatbox">
{#if !hasFinalResponse && !$sessionCompleted$ && !$fetchingSource$ && !$audioSource$}
<div class="shrink-0 w-full sm:max-w-xl lg:max-w-3xl max-w-full max-sm:px-4 px-1 py-4">
<ChatBoxContainer
bind:searchTerm
loading={navLoading}
showIcon
disabled={$sessionCompleted$ || disableTextInput}
on:keypress
on:click
/>
</div>
{/if}
</slot>
</div>
2 changes: 1 addition & 1 deletion app/src/lib/components/ChatListActionItems.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
})
.then((res) => {
$audioSource$ = res;
toast.success('Audiocast source generated successfully');
toast.success('AI-generated source material generated successfully');
})
.catch((error) => toast.error(error.message))
.finally(() => ($fetchingSource$ = false));
Expand Down
6 changes: 3 additions & 3 deletions app/src/lib/components/RenderExamples.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
import ExampleCard from './ExampleCard.svelte';
export let sessionId: string;
$: contentExamplesDict = Object.entries(contentExamples) as Array<
[category: ContentCategory, content: string]
>;
$: contentExamplesDict = (
Object.entries(contentExamples) as Array<[category: ContentCategory, content: string]>
).slice(0, 6);
</script>

<div class="w-full h-full block">
Expand Down
4 changes: 4 additions & 0 deletions app/src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,8 @@
</ChatBoxAndWidget>
{/if}
</svelte:fragment>

<svelte:fragment slot="chatbox">
<span></span>
</svelte:fragment>
</ChatContainer>

0 comments on commit d94cc60

Please sign in to comment.