Skip to content
This repository was archived by the owner on Jun 7, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 2 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,2 @@
[![Coverage Status](https://coveralls.io/repos/github/CodeHex16/Suppl-AI/badge.svg)](https://coveralls.io/github/CodeHex16/Suppl-AI)

# sv

Everything you need to build a Svelte project, powered by [`sv`](https://github.com/sveltejs/cli).

## Creating a project

If you're seeing this, you've probably already done this step. Congrats!

```bash
# create a new project in the current directory
npx sv create

# create a new project in my-app
npx sv create my-app
```

## Developing

Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:

```bash
npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open
```

## Building

To create a production version of your app:

```bash
npm run build
```

You can preview the production build with `npm run preview`.

> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.
# Suppl-AI
[![Coverage Status](https://coveralls.io/repos/github/CodeHex16/Suppl-AI/badge.svg)](https://coveralls.io/github/CodeHex16/Suppl-AI)
6 changes: 2 additions & 4 deletions src/lib/components/BotMessage.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
//lodash
import debounce from 'lodash/debounce';


marked.use({
gfm: true,
// breaks: true,
Expand Down Expand Up @@ -78,7 +77,6 @@
<div class="flex flex-col justify-start">
<div class="max-w-sm">
<div class="rounded-t-3xl rounded-br-3xl bg-white p-4 text-black shadow-md">
<!-- TODO: Scegliere che versione usare -->
<div class="font-bold item-primary px-2 rounded-full w-fit">Suppl-AI</div>
<!-- <div class="font-bold text-primary">Suppl-AI</div> -->
{#if data.content == ''}
Expand All @@ -87,8 +85,8 @@
<div class="mb-2 h-2 w-5/6 rounded bg-gray"></div>
</div>
{:else}
<!-- prose dark:prose-invert -->
<div class="markdown-content">
<!-- -->
<div class="markdown-content prose dark:prose-invert">
{@html formatMessage(data.content)}
</div>
{/if}
Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/SendMessage.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import { SendHorizontal, MessageCircleQuestion } from 'lucide-svelte';
import FaqItem from './FaqItem.svelte';
import { fly } from 'svelte/transition';
let { sending, onClickFaq, inputValue = $bindable()} = $props();
let { sending, onClickFaq, inputValue = $bindable() } = $props();
</script>

<div class="grid-chat-bottom-bar grid mx-4 mt-4">
{#if inputValue === ''}
{#if inputValue == ''}
<button
type="button"
onclick={onClickFaq}
Expand Down
3 changes: 2 additions & 1 deletion src/routes/chat/[id]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@
}
];
messageInput.value = '';
inputValue = '';
scrollToBottom();

logger.info('Salvataggio messaggio utente...');
Expand Down Expand Up @@ -275,6 +276,6 @@
</div>

<form data-testid="input_form" method="POST" onsubmit={submitMessageHandler}>
<SendMessage sending={waitingForResponse} onClickFaq={()=>(showModalFaq = true)} {inputValue} />
<SendMessage sending={waitingForResponse} onClickFaq={()=>(showModalFaq = true)} bind:inputValue={inputValue} />
</form>
</div>