Skip to content

Commit 769ef85

Browse files
committed
chore: format
1 parent ed1b959 commit 769ef85

61 files changed

Lines changed: 487 additions & 735 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/lib/components/chat/FileNav.svelte

Lines changed: 65 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,7 @@
296296
297297
const emptyFile = new File([''], name, { type: 'application/octet-stream' });
298298
const result = await uploadToTerminal(terminal.url, terminal.key, currentPath, emptyFile);
299-
toast[result ? 'success' : 'error'](
300-
$i18n.t(result ? 'File created' : 'Failed to create file')
301-
);
299+
toast[result ? 'success' : 'error']($i18n.t(result ? 'File created' : 'Failed to create file'));
302300
await loadDir(currentPath);
303301
};
304302
@@ -467,13 +465,39 @@
467465
aria-label={showRaw ? $i18n.t('Preview') : $i18n.t('Source')}
468466
>
469467
{#if showRaw}
470-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" class="size-3.5">
471-
<path stroke-linecap="round" stroke-linejoin="round" d="M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z" />
472-
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
468+
<svg
469+
xmlns="http://www.w3.org/2000/svg"
470+
viewBox="0 0 24 24"
471+
fill="none"
472+
stroke="currentColor"
473+
stroke-width="1.5"
474+
class="size-3.5"
475+
>
476+
<path
477+
stroke-linecap="round"
478+
stroke-linejoin="round"
479+
d="M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"
480+
/>
481+
<path
482+
stroke-linecap="round"
483+
stroke-linejoin="round"
484+
d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"
485+
/>
473486
</svg>
474487
{:else}
475-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" class="size-3.5">
476-
<path stroke-linecap="round" stroke-linejoin="round" d="M17.25 6.75 22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3-4.5 16.5" />
488+
<svg
489+
xmlns="http://www.w3.org/2000/svg"
490+
viewBox="0 0 24 24"
491+
fill="none"
492+
stroke="currentColor"
493+
stroke-width="1.5"
494+
class="size-3.5"
495+
>
496+
<path
497+
stroke-linecap="round"
498+
stroke-linejoin="round"
499+
d="M17.25 6.75 22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3-4.5 16.5"
500+
/>
477501
</svg>
478502
{/if}
479503
</button>
@@ -487,8 +511,15 @@
487511
on:click={() => filePreviewRef?.cancelEdit()}
488512
aria-label={$i18n.t('Cancel')}
489513
>
490-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="size-3.5">
491-
<path d="M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z" />
514+
<svg
515+
xmlns="http://www.w3.org/2000/svg"
516+
viewBox="0 0 20 20"
517+
fill="currentColor"
518+
class="size-3.5"
519+
>
520+
<path
521+
d="M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z"
522+
/>
492523
</svg>
493524
</button>
494525
</Tooltip>
@@ -502,8 +533,17 @@
502533
{#if saving}
503534
<Spinner className="size-3.5" />
504535
{:else}
505-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="size-3.5">
506-
<path fill-rule="evenodd" d="M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z" clip-rule="evenodd" />
536+
<svg
537+
xmlns="http://www.w3.org/2000/svg"
538+
viewBox="0 0 20 20"
539+
fill="currentColor"
540+
class="size-3.5"
541+
>
542+
<path
543+
fill-rule="evenodd"
544+
d="M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z"
545+
clip-rule="evenodd"
546+
/>
507547
</svg>
508548
{/if}
509549
</button>
@@ -526,8 +566,19 @@
526566
on:click={() => downloadFile(selectedFile)}
527567
aria-label={$i18n.t('Download')}
528568
>
529-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" class="size-3.5">
530-
<path stroke-linecap="round" stroke-linejoin="round" d="M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3" />
569+
<svg
570+
xmlns="http://www.w3.org/2000/svg"
571+
viewBox="0 0 24 24"
572+
fill="none"
573+
stroke="currentColor"
574+
stroke-width="1.5"
575+
class="size-3.5"
576+
>
577+
<path
578+
stroke-linecap="round"
579+
stroke-linejoin="round"
580+
d="M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3"
581+
/>
531582
</svg>
532583
</button>
533584
</Tooltip>

src/lib/components/chat/FileNav/FilePreview.svelte

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -191,18 +191,16 @@
191191
</tbody>
192192
</table>
193193
</div>
194+
{:else if editing}
195+
<textarea
196+
bind:this={editTextarea}
197+
bind:value={editContent}
198+
class="w-full h-full text-xs font-mono text-gray-800 dark:text-gray-200 whitespace-pre break-all leading-relaxed p-3 bg-transparent border-none outline-none resize-none"
199+
spellcheck="false"
200+
/>
194201
{:else}
195-
{#if editing}
196-
<textarea
197-
bind:this={editTextarea}
198-
bind:value={editContent}
199-
class="w-full h-full text-xs font-mono text-gray-800 dark:text-gray-200 whitespace-pre break-all leading-relaxed p-3 bg-transparent border-none outline-none resize-none"
200-
spellcheck="false"
201-
/>
202-
{:else}
203-
<pre
204-
class="text-xs font-mono text-gray-800 dark:text-gray-200 whitespace-pre-wrap break-all leading-relaxed p-3">{fileContent}</pre>
205-
{/if}
202+
<pre
203+
class="text-xs font-mono text-gray-800 dark:text-gray-200 whitespace-pre-wrap break-all leading-relaxed p-3">{fileContent}</pre>
206204
{/if}
207205
{:else}
208206
<div class="text-sm text-gray-400 text-center pt-8">

src/lib/i18n/locales/ar-BH/translation.json

Lines changed: 7 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -19,36 +19,11 @@
1919
"{{COUNT}} Rows": "",
2020
"{{COUNT}} Sources": "",
2121
"{{COUNT}} words": "",
22-
"{{COUNT}}d_time_ago_zero": "",
23-
"{{COUNT}}d_time_ago_one": "",
24-
"{{COUNT}}d_time_ago_two": "",
25-
"{{COUNT}}d_time_ago_few": "",
26-
"{{COUNT}}d_time_ago_many": "",
27-
"{{COUNT}}d_time_ago_other": "",
28-
"{{COUNT}}h_time_ago_zero": "",
29-
"{{COUNT}}h_time_ago_one": "",
30-
"{{COUNT}}h_time_ago_two": "",
31-
"{{COUNT}}h_time_ago_few": "",
32-
"{{COUNT}}h_time_ago_many": "",
33-
"{{COUNT}}h_time_ago_other": "",
34-
"{{COUNT}}m_time_ago_zero": "",
35-
"{{COUNT}}m_time_ago_one": "",
36-
"{{COUNT}}m_time_ago_two": "",
37-
"{{COUNT}}m_time_ago_few": "",
38-
"{{COUNT}}m_time_ago_many": "",
39-
"{{COUNT}}m_time_ago_other": "",
40-
"{{COUNT}}w_time_ago_zero": "",
41-
"{{COUNT}}w_time_ago_one": "",
42-
"{{COUNT}}w_time_ago_two": "",
43-
"{{COUNT}}w_time_ago_few": "",
44-
"{{COUNT}}w_time_ago_many": "",
45-
"{{COUNT}}w_time_ago_other": "",
46-
"{{COUNT}}y_time_ago_zero": "",
47-
"{{COUNT}}y_time_ago_one": "",
48-
"{{COUNT}}y_time_ago_two": "",
49-
"{{COUNT}}y_time_ago_few": "",
50-
"{{COUNT}}y_time_ago_many": "",
51-
"{{COUNT}}y_time_ago_other": "",
22+
"{{COUNT}}d_time_ago": "",
23+
"{{COUNT}}h_time_ago": "",
24+
"{{COUNT}}m_time_ago": "",
25+
"{{COUNT}}w_time_ago": "",
26+
"{{COUNT}}y_time_ago": "",
5227
"{{LOCALIZED_DATE}} at {{LOCALIZED_TIME}}": "",
5328
"{{model}} download has been canceled": "",
5429
"{{modelName}} profile image": "",
@@ -897,6 +872,7 @@
897872
"File Context": "",
898873
"File deleted successfully.": "",
899874
"File Mode": "وضع الملف",
875+
"File name": "",
900876
"File not found.": "لم يتم العثور على الملف.",
901877
"File removed successfully.": "",
902878
"File size should not exceed {{maxSize}} MB.": "",
@@ -1289,6 +1265,7 @@
12891265
"New": "",
12901266
"New Button": "",
12911267
"New Chat": "دردشة جديدة",
1268+
"New File": "",
12921269
"New Folder": "",
12931270
"New Function": "",
12941271
"New Group": "",

src/lib/i18n/locales/ar/translation.json

Lines changed: 7 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -19,36 +19,11 @@
1919
"{{COUNT}} Rows": "",
2020
"{{COUNT}} Sources": "",
2121
"{{COUNT}} words": "",
22-
"{{COUNT}}d_time_ago_zero": "",
23-
"{{COUNT}}d_time_ago_one": "",
24-
"{{COUNT}}d_time_ago_two": "",
25-
"{{COUNT}}d_time_ago_few": "",
26-
"{{COUNT}}d_time_ago_many": "",
27-
"{{COUNT}}d_time_ago_other": "",
28-
"{{COUNT}}h_time_ago_zero": "",
29-
"{{COUNT}}h_time_ago_one": "",
30-
"{{COUNT}}h_time_ago_two": "",
31-
"{{COUNT}}h_time_ago_few": "",
32-
"{{COUNT}}h_time_ago_many": "",
33-
"{{COUNT}}h_time_ago_other": "",
34-
"{{COUNT}}m_time_ago_zero": "",
35-
"{{COUNT}}m_time_ago_one": "",
36-
"{{COUNT}}m_time_ago_two": "",
37-
"{{COUNT}}m_time_ago_few": "",
38-
"{{COUNT}}m_time_ago_many": "",
39-
"{{COUNT}}m_time_ago_other": "",
40-
"{{COUNT}}w_time_ago_zero": "",
41-
"{{COUNT}}w_time_ago_one": "",
42-
"{{COUNT}}w_time_ago_two": "",
43-
"{{COUNT}}w_time_ago_few": "",
44-
"{{COUNT}}w_time_ago_many": "",
45-
"{{COUNT}}w_time_ago_other": "",
46-
"{{COUNT}}y_time_ago_zero": "",
47-
"{{COUNT}}y_time_ago_one": "",
48-
"{{COUNT}}y_time_ago_two": "",
49-
"{{COUNT}}y_time_ago_few": "",
50-
"{{COUNT}}y_time_ago_many": "",
51-
"{{COUNT}}y_time_ago_other": "",
22+
"{{COUNT}}d_time_ago": "",
23+
"{{COUNT}}h_time_ago": "",
24+
"{{COUNT}}m_time_ago": "",
25+
"{{COUNT}}w_time_ago": "",
26+
"{{COUNT}}y_time_ago": "",
5227
"{{LOCALIZED_DATE}} at {{LOCALIZED_TIME}}": "",
5328
"{{model}} download has been canceled": "",
5429
"{{modelName}} profile image": "",
@@ -897,6 +872,7 @@
897872
"File Context": "",
898873
"File deleted successfully.": "",
899874
"File Mode": "وضع الملف",
875+
"File name": "",
900876
"File not found.": "لم يتم العثور على الملف.",
901877
"File removed successfully.": "تم حذف الملف بنجاح.",
902878
"File size should not exceed {{maxSize}} MB.": "يجب ألا يتجاوز حجم الملف {{maxSize}} ميغابايت.",
@@ -1289,6 +1265,7 @@
12891265
"New": "",
12901266
"New Button": "",
12911267
"New Chat": "دردشة جديدة",
1268+
"New File": "",
12921269
"New Folder": "مجلد جديد",
12931270
"New Function": "",
12941271
"New Group": "",

src/lib/i18n/locales/bg-BG/translation.json

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,11 @@
1919
"{{COUNT}} Rows": "",
2020
"{{COUNT}} Sources": "",
2121
"{{COUNT}} words": "",
22-
"{{COUNT}}d_time_ago_one": "",
23-
"{{COUNT}}d_time_ago_other": "",
24-
"{{COUNT}}h_time_ago_one": "",
25-
"{{COUNT}}h_time_ago_other": "",
26-
"{{COUNT}}m_time_ago_one": "",
27-
"{{COUNT}}m_time_ago_other": "",
28-
"{{COUNT}}w_time_ago_one": "",
29-
"{{COUNT}}w_time_ago_other": "",
30-
"{{COUNT}}y_time_ago_one": "",
31-
"{{COUNT}}y_time_ago_other": "",
22+
"{{COUNT}}d_time_ago": "",
23+
"{{COUNT}}h_time_ago": "",
24+
"{{COUNT}}m_time_ago": "",
25+
"{{COUNT}}w_time_ago": "",
26+
"{{COUNT}}y_time_ago": "",
3227
"{{LOCALIZED_DATE}} at {{LOCALIZED_TIME}}": "",
3328
"{{model}} download has been canceled": "",
3429
"{{modelName}} profile image": "",
@@ -877,6 +872,7 @@
877872
"File Context": "",
878873
"File deleted successfully.": "",
879874
"File Mode": "Файлов режим",
875+
"File name": "",
880876
"File not found.": "Файл не е намерен.",
881877
"File removed successfully.": "Файлът е премахнат успешно.",
882878
"File size should not exceed {{maxSize}} MB.": "Размерът на файла не трябва да надвишава {{maxSize}} MB.",
@@ -1269,6 +1265,7 @@
12691265
"New": "",
12701266
"New Button": "",
12711267
"New Chat": "Нов чат",
1268+
"New File": "",
12721269
"New Folder": "Нова папка",
12731270
"New Function": "",
12741271
"New Group": "",

src/lib/i18n/locales/bn-BD/translation.json

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,11 @@
1919
"{{COUNT}} Rows": "",
2020
"{{COUNT}} Sources": "",
2121
"{{COUNT}} words": "",
22-
"{{COUNT}}d_time_ago_one": "",
23-
"{{COUNT}}d_time_ago_other": "",
24-
"{{COUNT}}h_time_ago_one": "",
25-
"{{COUNT}}h_time_ago_other": "",
26-
"{{COUNT}}m_time_ago_one": "",
27-
"{{COUNT}}m_time_ago_other": "",
28-
"{{COUNT}}w_time_ago_one": "",
29-
"{{COUNT}}w_time_ago_other": "",
30-
"{{COUNT}}y_time_ago_one": "",
31-
"{{COUNT}}y_time_ago_other": "",
22+
"{{COUNT}}d_time_ago": "",
23+
"{{COUNT}}h_time_ago": "",
24+
"{{COUNT}}m_time_ago": "",
25+
"{{COUNT}}w_time_ago": "",
26+
"{{COUNT}}y_time_ago": "",
3227
"{{LOCALIZED_DATE}} at {{LOCALIZED_TIME}}": "",
3328
"{{model}} download has been canceled": "",
3429
"{{modelName}} profile image": "",
@@ -877,6 +872,7 @@
877872
"File Context": "",
878873
"File deleted successfully.": "",
879874
"File Mode": "ফাইল মোড",
875+
"File name": "",
880876
"File not found.": "ফাইল পাওয়া যায়নি",
881877
"File removed successfully.": "",
882878
"File size should not exceed {{maxSize}} MB.": "",
@@ -1269,6 +1265,7 @@
12691265
"New": "",
12701266
"New Button": "",
12711267
"New Chat": "নতুন চ্যাট",
1268+
"New File": "",
12721269
"New Folder": "",
12731270
"New Function": "",
12741271
"New Group": "",

src/lib/i18n/locales/bo-TB/translation.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
"{{COUNT}} Rows": "",
2020
"{{COUNT}} Sources": "",
2121
"{{COUNT}} words": "",
22-
"{{COUNT}}d_time_ago_other": "",
23-
"{{COUNT}}h_time_ago_other": "",
24-
"{{COUNT}}m_time_ago_other": "",
25-
"{{COUNT}}w_time_ago_other": "",
26-
"{{COUNT}}y_time_ago_other": "",
22+
"{{COUNT}}d_time_ago": "",
23+
"{{COUNT}}h_time_ago": "",
24+
"{{COUNT}}m_time_ago": "",
25+
"{{COUNT}}w_time_ago": "",
26+
"{{COUNT}}y_time_ago": "",
2727
"{{LOCALIZED_DATE}} at {{LOCALIZED_TIME}}": "",
2828
"{{model}} download has been canceled": "",
2929
"{{modelName}} profile image": "",
@@ -872,6 +872,7 @@
872872
"File Context": "",
873873
"File deleted successfully.": "",
874874
"File Mode": "ཡིག་ཆའི་མ་དཔེ།",
875+
"File name": "",
875876
"File not found.": "ཡིག་ཆ་མ་རྙེད།",
876877
"File removed successfully.": "ཡིག་ཆ་ལེགས་པར་བསུབས་ཟིན།",
877878
"File size should not exceed {{maxSize}} MB.": "ཡིག་ཆའི་ཆེ་ཆུང་ {{maxSize}} MB ལས་མི་བརྒལ་དགོས།",
@@ -1264,6 +1265,7 @@
12641265
"New": "",
12651266
"New Button": "",
12661267
"New Chat": "ཁ་བརྡ་གསར་པ།",
1268+
"New File": "",
12671269
"New Folder": "ཡིག་སྣོད་གསར་པ།",
12681270
"New Function": "",
12691271
"New Group": "",

0 commit comments

Comments
 (0)