Skip to content

Commit 3d523f8

Browse files
authored
Release 1.0.1 (#75)
* style(logo): final mvp version * refactor: vector store files in seperate directory * up manifest * fix(style): rag toggle icon covers text * style(onboarding): imroved ux * up manifest
1 parent 1c67929 commit 3d523f8

File tree

9 files changed

+57
-31
lines changed

9 files changed

+57
-31
lines changed

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "Interact with your privacy focused assistant, leveraging Ollama or OpenAI, making your second brain even smarter.",
55
"author": "Leo310, nicobrauchtgit",
66
"authorUrl": "https://github.com/nicobrauchtgit",
7-
"version": "1.0.0",
7+
"version": "1.0.1",
88
"minAppVersion": "1.5.0",
99
"isDesktopOnly": true
1010
}

src/components/Chat/Chat.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
2525
let isAutoScrolling = true;
2626
let chatWindow: HTMLDivElement;
27-
$: if (chatWindow && $papaState === 'running' && isAutoScrolling && $chatHistory) {
27+
$: if (chatWindow && $papaState === 'running' && isAutoScrolling && $runContent) {
2828
chatWindow.scrollTop = chatWindow.scrollHeight;
2929
}
3030
let contentNode: HTMLElement;
@@ -65,7 +65,7 @@
6565
<div
6666
bind:this={chatWindow}
6767
on:scroll={() => (isAutoScrolling = chatWindow.scrollTop + chatWindow.clientHeight + 1 >= chatWindow.scrollHeight)}
68-
class="chat-window w-full flex-grow select-text overflow-y-scroll rounded-md border border-solid border-[--background-modifier-border] bg-[--background-primary]"
68+
class="chat-window w-full pb-8 flex-grow select-text overflow-y-scroll rounded-md border border-solid border-[--background-modifier-border] bg-[--background-primary]"
6969
>
7070
{#each $chatHistory as message (message.id)}
7171
<MessageContainer role={message.role}>
@@ -148,5 +148,5 @@
148148
{/if}
149149
</div>
150150
<InputComponent bind:textarea />
151-
<span class="mb-3" />
151+
<div class="mb-3" />
152152
</div>

src/components/Onboarding/OllamaApp.svelte

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,14 @@
44
import { isOllamaRunning } from '../../controller/Ollama';
55
import OllamaSetup from './OllamaSetup.svelte';
66
import { t } from 'svelte-i18n';
7+
import { afterUpdate } from 'svelte';
78
89
export let osType: string;
10+
export let scrollToBottom = () => {};
11+
12+
afterUpdate(() => {
13+
scrollToBottom();
14+
});
915
1016
let isRunning: boolean = false;
1117
let isOllamaTested: boolean = false;
@@ -52,11 +58,11 @@
5258
<li>
5359
{$t('onboarding.ollama.app.restart')}<span aria-label={$t('onboarding.ollama.app.restart_label')} use:icon={'help-circle'} />
5460
</li>
55-
{:else}
61+
{:else if osType === 'Windows_NT'}
5662
<li>{$t('onboarding.ollama.app.quit')}<span aria-label={$t('onboarding.ollama.app.quit_label')} use:icon={'help-circle'} /></li>
5763
<li>{$t('onboarding.ollama.app.start_origins')}</li>
5864
<div class="w-max max-w-full text-xs *:flex *:rounded *:pr-1" use:renderMarkdown={(this, '```bash\n$env:OLLAMA_ORIGINS="*"; ollama serve\n```')} />
5965
{/if}
60-
<OllamaSetup />
66+
<OllamaSetup {scrollToBottom} />
6167
{/if}
6268
</ol>

src/components/Onboarding/OllamaDaemon.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import { t } from 'svelte-i18n';
99
1010
export let osType: string;
11+
export let scrollToBottom = () => {};
1112
1213
onMount(() => {
1314
$data.isIncognitoMode = true;
@@ -34,5 +35,5 @@
3435
</li>
3536
<li>{$t('onboarding.ollama.deamon.start')}</li>
3637
<div class="w-max max-w-full text-xs *:flex *:rounded *:pr-1" use:renderMarkdown={(this, '```bash\nOLLAMA_ORIGINS="*" ollama serve\n```')} />
37-
<OllamaSetup />
38+
<OllamaSetup {scrollToBottom} />
3839
</ol>

src/components/Onboarding/OllamaSetup.svelte

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts">
22
import InitButtonComponent from './InitButton.svelte';
3-
import { onMount } from 'svelte';
3+
import { afterUpdate, onMount } from 'svelte';
44
import { getOllamaModels } from '../../controller/Ollama';
55
import { icon } from '../../controller/Messages';
66
import { plugin, data } from '../../store';
@@ -9,6 +9,12 @@
99
import { t } from 'svelte-i18n';
1010
import PullOllamaModel from './PullOllamaModel.svelte';
1111
12+
export let scrollToBottom = () => {};
13+
14+
afterUpdate(() => {
15+
scrollToBottom();
16+
});
17+
1218
let ollamaModels: string[] = [];
1319
let model: string = '';
1420
let ollamaModelComponent: DropdownComponent;
@@ -51,14 +57,14 @@
5157
{#if isOrigin}
5258
<li>
5359
{$t('onboarding.ollama.install_model')}<br />
54-
<PullOllamaModel {pullModel} text="Recommended" onSuccessfulPull={async () => (ollamaModels = await getOllamaModels())} />
60+
<PullOllamaModel {pullModel} text={$t('onboarding.ollama.recommended')} onSuccessfulPull={async () => (ollamaModels = await getOllamaModels())} />
5561
</li>
5662
{#if ollamaModels.length > 0}
5763
<li>
5864
<div class="flex flex-wrap items-center justify-between">
5965
{$t('onboarding.ollama.set_model')}
6066
<div class="flex items-center gap-1">
61-
<button class="clickable-icon mr-1" use:icon={'refresh-ccw'} on:click={async () => (ollamaModels = await getOllamaModels())} />
67+
<button class="clickable-icon" use:icon={'refresh-ccw'} on:click={async () => (ollamaModels = await getOllamaModels())} />
6268
<DropdownComponent
6369
bind:this={ollamaModelComponent}
6470
selected={model}
@@ -70,7 +76,7 @@
7076
</li>
7177
{/if}
7278
{#if model !== ''}
73-
<div class="mt-4 w-full text-center">
79+
<div class="my-4 w-full text-center">
7480
<InitButtonComponent />
7581
</div>
7682
{/if}

src/components/Onboarding/Onboarding.svelte

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,25 @@
22
import { data } from '../../store';
33
import * as os from 'os';
44
import SliderComponent from '../base/Slider.svelte';
5-
import AppComponent from './OllamaApp.svelte';
5+
import OllamaAppComponent from './OllamaApp.svelte';
66
import OpenAiComponent from './OpenAI.svelte';
7-
import DaemonComponent from './OllamaDaemon.svelte';
7+
import OllamaDaemonComponent from './OllamaDaemon.svelte';
88
import IncognitoToggle from '../Settings/IncognitoToggle.svelte';
99
import { t } from 'svelte-i18n';
1010
import Logo from '../Logos/Logo.svelte';
1111
1212
const osType = os.type();
1313
1414
const options = ['Ollama App', 'Ollama Daemon'];
15-
let selected: 'Ollama App' | 'Ollama Daemon' = 'Ollama App';
15+
let selected: 'Ollama App' | 'Ollama Daemon' = osType === 'Linux' ? 'Ollama Daemon' : 'Ollama App';
16+
17+
let onboardingWindow: HTMLDivElement;
18+
function scrollToBottom() {
19+
onboardingWindow.scrollTop = onboardingWindow.scrollHeight;
20+
}
1621
</script>
1722

18-
<div class="mx-auto flex h-full w-full max-w-[500px] flex-col items-center overflow-auto pt-8">
23+
<div bind:this={onboardingWindow} class="mx-auto flex h-full w-full max-w-[500px] flex-col items-center overflow-auto p-8">
1924
<div class="mb-2 h-40 w-40">
2025
<Logo />
2126
</div>
@@ -29,15 +34,15 @@
2934
{#if osType === 'Darwin'}
3035
<SliderComponent {options} bind:selected />
3136
{/if}
32-
{#if selected === 'Ollama App' || osType === 'Windows_NT'}
33-
<AppComponent {osType} />
37+
{#if selected === 'Ollama App'}
38+
<OllamaAppComponent {osType} {scrollToBottom} />
3439
{:else}
35-
<DaemonComponent {osType} />
40+
<OllamaDaemonComponent {osType} {scrollToBottom} />
3641
{/if}
3742
{:else}
3843
<p class="px-10">
3944
{$t('onboarding.openai_mode_note')}
4045
</p>
41-
<OpenAiComponent />
46+
<OpenAiComponent {scrollToBottom} />
4247
{/if}
4348
</div>

src/components/Onboarding/OpenAI.svelte

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@
66
import { plugin, data } from '../../store';
77
import InitButtonComponent from './InitButton.svelte';
88
import { t } from 'svelte-i18n';
9+
import { afterUpdate } from 'svelte';
10+
11+
export let scrollToBottom = () => {};
12+
13+
afterUpdate(() => {
14+
scrollToBottom();
15+
});
916
1017
let openAIApiKey: string = $data.openAIGenModel.openAIApiKey;
1118
let isValid: boolean = false;
@@ -62,5 +69,7 @@
6269
</li>
6370
</ol>
6471
{#if isValid}
65-
<InitButtonComponent />
72+
<div class="w-full text-center">
73+
<InitButtonComponent />
74+
</div>
6675
{/if}

src/components/Onboarding/PullOllamaModel.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
let progress: number = 0;
1919
let status: string = '';
2020
let isPullingError = false;
21-
console.log('pullModel', pullModel);
2221
2322
async function pullOllamaModelStream() {
2423
isPullingModel = true;

src/lang/en.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,35 +73,35 @@
7373
"input_placeholder": "Chat with your Smart Second Brain..."
7474
},
7575
"onboarding": {
76-
"welcome_msg": "Welcome to your Smart Second Brain! Your personal AI assistant that helps you to find information in your notes.",
76+
"welcome_msg": "Welcome to your Smart Second Brain! Your personal AI assistant that helps you to find and process information in your notes.",
7777
"setup": "Setup",
7878
"test": "Test",
79-
"privacy_mode_note": "Your assistant is running in privacy mode. That means it is not connected to the internet and is running fully locally by leveraging Ollama.",
80-
"openai_mode_note": "Your assistant is using third party services to run. That means you will have to share all your personal information with these services and your Smart Second Brain needs to be connected to the internet to leverage OpenAIs large language models like ChatGPT.",
79+
"privacy_mode_note": "Your assistant will run in privacy mode. That means it is not connected to the internet and is running fully locally by leveraging Ollama.",
80+
"openai_mode_note": "Your assistant will use third-party services to run. That means you will have to share all your personal information with these services and your Smart Second Brain needs to be connected to the internet to leverage OpenAIs large language models like ChatGPT.",
8181
"init": "Start your Smart Second Brain",
8282
"init_label": "Click to Start",
8383
"ollama": {
8484
"deamon": {
85-
"install": "Install Ollama",
85+
"install": "Install Ollama in the terminal:",
8686
"set_baseurl": "Set the Ollama Base URL",
87-
"start": "Start the Ollama with origins"
87+
"start": "Start Ollama by running this command in the terminal"
8888
},
8989
"app": {
9090
"download": "Download the App",
9191
"download_link": "here",
9292
"extract": "Extract the .zip and start Ollama",
9393
"run": "Run the setup.exe",
9494
"test_label": "Test if Ollama is running",
95-
"set_origins": "Set Ollama origins to enable streaming responses",
95+
"set_origins": "In the terminal set Ollama origins to enable streaming responses:",
9696
"restart": "Restart the Ollama service ",
97-
"restart_label": "Click menu bar icon and then quit",
97+
"restart_label": "Click Ollamas menu bar icon and then quit",
9898
"quit": "Quit the Ollama service ",
99-
"quit_label": "Click menu bar icon and then quit",
100-
"start_origins": "Start the Ollama service with origins"
99+
"quit_label": "Click Ollamas menu bar icon and then quit",
100+
"start_origins": "Start Ollama by running this command in the powershell"
101101
},
102102
"test_origins": "Test if the origins are set correctly",
103103
"install_model": "Install an Ollama Embedding Model.",
104-
"recommended_models": "Recommended:",
104+
"recommended": "Recommended: ",
105105
"set_model": "Set your Embedding Model:"
106106
},
107107
"openai": {

0 commit comments

Comments
 (0)