Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 14, 2025
1 parent fec4c2f commit 1dca055
Show file tree
Hide file tree
Showing 77 changed files with 644 additions and 356 deletions.
6 changes: 1 addition & 5 deletions AgentQnA/ui/svelte/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
],
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"],
plugins: ["svelte3", "@typescript-eslint", "neverthrow"],
ignorePatterns: ["*.cjs"],
overrides: [{ files: ["*.svelte"], processor: "svelte3/svelte3" }],
Expand Down
8 changes: 4 additions & 4 deletions AgentQnA/ui/svelte/postcss.config.cjs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
const tailwindcss = require('tailwindcss');
const autoprefixer = require('autoprefixer');
const tailwindcss = require("tailwindcss");
const autoprefixer = require("autoprefixer");

const config = {
plugins: [
//Some plugins, like tailwindcss/nesting, need to run before Tailwind,
tailwindcss(),
//But others, like autoprefixer, need to run after,
autoprefixer
]
autoprefixer,
],
};

module.exports = config;
50 changes: 18 additions & 32 deletions AgentQnA/ui/svelte/src/app.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (C) 2025 Intel Corporation
// SPDX-License-Identifier: Apache-2.0

// See: https://kit.svelte.dev/docs/types#app
// import { Result} from "neverthrow";

Expand All @@ -21,44 +24,27 @@ interface User {
type AuthResponse = Result<User>;

interface AuthAdapter {
login(props: {
email: string;
password: string;
}): Promise<AuthResponse>;
signup(props: {
email: string;
password: string;
password_confirm: string;
}): Promise<AuthResponse>;
validate_session(props: {
token: string;
}): Promise<AuthResponse>;
logout(props: {
token: string;
email: string;
}): Promise<Result<void>>;
forgotPassword(props: {
email: string;
password: string;
}): Promise<Result<void>>;
login(props: { email: string; password: string }): Promise<AuthResponse>;
signup(props: { email: string; password: string; password_confirm: string }): Promise<AuthResponse>;
validate_session(props: { token: string }): Promise<AuthResponse>;
logout(props: { token: string; email: string }): Promise<Result<void>>;
forgotPassword(props: { email: string; password: string }): Promise<Result<void>>;
}

interface ChatAdapter {
modelList(props: {
}): Promise<Result<void>>;
txt2img(props: {
}): Promise<Result<void>>;
modelList(props: {}): Promise<Result<void>>;
txt2img(props: {}): Promise<Result<void>>;
}

interface ChatMessage {
role: string,
content: string
role: string;
content: string;
}

interface ChatMessageType {
model: string,
knowledge: string,
temperature: string,
max_new_tokens: string,
topk: string,
}
model: string;
knowledge: string;
temperature: string;
max_new_tokens: string;
topk: string;
}
7 changes: 6 additions & 1 deletion AgentQnA/ui/svelte/src/app.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<!DOCTYPE html>
<!--
Copyright (C) 2025 Intel Corporation
SPDX-License-Identifier: Apache-2.0
-->

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
Expand Down
5 changes: 5 additions & 0 deletions AgentQnA/ui/svelte/src/lib/assets/Agent/createSub.svelte
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
Copyright (C) 2025 Intel Corporation
SPDX-License-Identifier: Apache-2.0
-->

<svg
t="1731984271860"
class="w-8 h-8"
Expand Down
7 changes: 6 additions & 1 deletion AgentQnA/ui/svelte/src/lib/assets/Agent/download.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<!--
Copyright (C) 2025 Intel Corporation
SPDX-License-Identifier: Apache-2.0
-->

<svg class="w-3.5 h-3.5 me-2.5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20">
<path d="M14.707 7.793a1 1 0 0 0-1.414 0L11 10.086V1.5a1 1 0 0 0-2 0v8.586L6.707 7.793a1 1 0 1 0-1.414 1.414l4 4a1 1 0 0 0 1.416 0l4-4a1 1 0 0 0-.002-1.414Z"/>
<path d="M18 12h-2.55l-2.975 2.975a3.5 3.5 0 0 1-4.95 0L4.55 12H2a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2Zm-3 5a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"/>
</svg>
</svg>
7 changes: 6 additions & 1 deletion AgentQnA/ui/svelte/src/lib/assets/Agent/eye.svelte
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
Copyright (C) 2025 Intel Corporation
SPDX-License-Identifier: Apache-2.0
-->

<svg
class="me-2 h-3 w-3"
aria-hidden="true"
Expand All @@ -8,4 +13,4 @@
<path
d="M10 0C4.612 0 0 5.336 0 7c0 1.742 3.546 7 10 7 6.454 0 10-5.258 10-7 0-1.664-4.612-7-10-7Zm0 10a3 3 0 1 1 0-6 3 3 0 0 1 0 6Z"
/>
</svg>
</svg>
5 changes: 5 additions & 0 deletions AgentQnA/ui/svelte/src/lib/assets/Agent/newAI.svelte
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
Copyright (C) 2025 Intel Corporation
SPDX-License-Identifier: Apache-2.0
-->

<!-- <svg class="h-11 w-11 flex-none overflow-visible" fill="none"
><defs
><filter
Expand Down
7 changes: 6 additions & 1 deletion AgentQnA/ui/svelte/src/lib/assets/Agent/resource.svelte
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
Copyright (C) 2025 Intel Corporation
SPDX-License-Identifier: Apache-2.0
-->

<svg class="h-5 w-5 flex-shrink-0 text-[#1d4dd5]" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" data-slot="icon">
<path fill-rule="evenodd" d="M15.621 4.379a3 3 0 0 0-4.242 0l-7 7a3 3 0 0 0 4.241 4.243h.001l.497-.5a.75.75 0 0 1 1.064 1.057l-.498.501-.002.002a4.5 4.5 0 0 1-6.364-6.364l7-7a4.5 4.5 0 0 1 6.368 6.36l-3.455 3.553A2.625 2.625 0 1 1 9.52 9.52l3.45-3.451a.75.75 0 1 1 1.061 1.06l-3.45 3.451a1.125 1.125 0 0 0 1.587 1.595l3.454-3.553a3 3 0 0 0 0-4.242Z" clip-rule="evenodd"></path>
</svg>
</svg>
7 changes: 6 additions & 1 deletion AgentQnA/ui/svelte/src/lib/assets/Agent/search.svelte
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
<!--
Copyright (C) 2025 Intel Corporation
SPDX-License-Identifier: Apache-2.0
-->

<svg
class="pointer-events-none absolute left-0 ml-4 hidden h-4 w-4 fill-current text-gray-500 group-hover:text-gray-400 sm:block"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 20 20"
><path
d="M12.9 14.32a8 8 0 1 1 1.41-1.41l5.35 5.33-1.42 1.42-5.33-5.34zM8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z"
/></svg
>
>
7 changes: 6 additions & 1 deletion AgentQnA/ui/svelte/src/lib/assets/Agent/searchDelete.svelte
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
Copyright (C) 2025 Intel Corporation
SPDX-License-Identifier: Apache-2.0
-->

<svg
fill="none"
class="relative h-5 w-5"
Expand All @@ -9,4 +14,4 @@
><path
d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"
/></svg
>
>
5 changes: 5 additions & 0 deletions AgentQnA/ui/svelte/src/lib/assets/Agent/searchResult.svelte
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
Copyright (C) 2025 Intel Corporation
SPDX-License-Identifier: Apache-2.0
-->

<svg
t="1731987484014"
class="w-5 h-5"
Expand Down
5 changes: 5 additions & 0 deletions AgentQnA/ui/svelte/src/lib/assets/Agent/star.svelte
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
Copyright (C) 2025 Intel Corporation
SPDX-License-Identifier: Apache-2.0
-->

<svg
t="1730766012593"
viewBox="0 0 1024 1024"
Expand Down
5 changes: 5 additions & 0 deletions AgentQnA/ui/svelte/src/lib/assets/Agent/summary.svelte
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
Copyright (C) 2025 Intel Corporation
SPDX-License-Identifier: Apache-2.0
-->

<svg
t="1731984744752"
class="w-12 h-12"
Expand Down
5 changes: 5 additions & 0 deletions AgentQnA/ui/svelte/src/lib/assets/Agent/taskIcon.svelte
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
Copyright (C) 2025 Intel Corporation
SPDX-License-Identifier: Apache-2.0
-->

<svg
t="1731987065328"
class="w-5 h-5"
Expand Down
5 changes: 5 additions & 0 deletions AgentQnA/ui/svelte/src/lib/assets/Agent/taskResult.svelte
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
Copyright (C) 2025 Intel Corporation
SPDX-License-Identifier: Apache-2.0
-->

<svg
t="1731987759041"
class="w-7 h-7"
Expand Down
7 changes: 6 additions & 1 deletion AgentQnA/ui/svelte/src/lib/assets/Agent/time.svelte
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
Copyright (C) 2025 Intel Corporation
SPDX-License-Identifier: Apache-2.0
-->

<svg class="w-2.5 h-2.5 text-blue-800 dark:text-blue-300" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20">
<path d="M20 4a2 2 0 0 0-2-2h-2V1a1 1 0 0 0-2 0v1h-3V1a1 1 0 0 0-2 0v1H6V1a1 1 0 0 0-2 0v1H2a2 2 0 0 0-2 2v2h20V4ZM0 18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8H0v10Zm5-8h10a1 1 0 0 1 0 2H5a1 1 0 0 1 0-2Z"/>
</svg>
</svg>
5 changes: 5 additions & 0 deletions AgentQnA/ui/svelte/src/lib/assets/Agent/toolIcon.svelte
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
Copyright (C) 2025 Intel Corporation
SPDX-License-Identifier: Apache-2.0
-->

<svg
t="1731987374334"
class="w-4 h-4"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
Copyright (C) 2025 Intel Corporation
SPDX-License-Identifier: Apache-2.0
-->

<svg
t="1699532005309"
class="icon"
Expand All @@ -21,4 +26,3 @@
class=""
/></svg
>

Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
Copyright (C) 2025 Intel Corporation
SPDX-License-Identifier: Apache-2.0
-->

<svg
t="1699531880178"
class="icon"
Expand Down
5 changes: 5 additions & 0 deletions AgentQnA/ui/svelte/src/lib/assets/icons/Folder.svelte
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
Copyright (C) 2025 Intel Corporation
SPDX-License-Identifier: Apache-2.0
-->

<svg
t="1697617760586"
class="h-10 w-10"
Expand Down
5 changes: 5 additions & 0 deletions AgentQnA/ui/svelte/src/lib/assets/icons/Knowledge.svelte
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
Copyright (C) 2025 Intel Corporation
SPDX-License-Identifier: Apache-2.0
-->

<svg
class="h-10 w-10"
viewBox="0 0 1024 1024"
Expand Down
5 changes: 5 additions & 0 deletions AgentQnA/ui/svelte/src/lib/assets/icons/NoTranslate.svelte
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
Copyright (C) 2025 Intel Corporation
SPDX-License-Identifier: Apache-2.0
-->

<svg
t="1699516160889"
class="icon"
Expand Down
7 changes: 6 additions & 1 deletion AgentQnA/ui/svelte/src/lib/assets/icons/OldHelp.svelte
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
Copyright (C) 2025 Intel Corporation
SPDX-License-Identifier: Apache-2.0
-->

<svg
t="1689149335476"
class="icon"
Expand Down Expand Up @@ -33,4 +38,4 @@ data-spm-anchor-id="a313x.7781069.0.i17"
data-spm-anchor-id="a313x.7781069.0.i10"
class="selected"
/></svg
>
>
7 changes: 6 additions & 1 deletion AgentQnA/ui/svelte/src/lib/assets/icons/Question.svelte
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
<svg t="1689232479587" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="20682" width="32" height="32"><path d="M512 512m-384 0a384 384 0 1 0 768 0 384 384 0 1 0-768 0Z" fill="#2196F3" p-id="20683"></path><path d="M465.28 613.333333c0-134.4 109.013333-138.453333 109.013333-217.386666a58.88 58.88 0 0 0-61.013333-64 59.093333 59.093333 0 0 0-64 59.946666h-81.066667c0-21.333333 10.24-128 144.64-128 142.08 0 142.08 108.586667 142.08 128 0 106.666667-114.346667 119.04-114.346666 220.373334z m-5.546667 103.68a42.666667 42.666667 0 0 1 45.653334-43.946666 42.666667 42.666667 0 0 1 45.866666 43.946666 42.666667 42.666667 0 0 1-45.866666 42.666667 42.666667 42.666667 0 0 1-45.653334-42.666667z" fill="#FFFFFF" p-id="20684"></path></svg>
<!--
Copyright (C) 2025 Intel Corporation
SPDX-License-Identifier: Apache-2.0
-->

<svg t="1689232479587" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="20682" width="32" height="32"><path d="M512 512m-384 0a384 384 0 1 0 768 0 384 384 0 1 0-768 0Z" fill="#2196F3" p-id="20683"></path><path d="M465.28 613.333333c0-134.4 109.013333-138.453333 109.013333-217.386666a58.88 58.88 0 0 0-61.013333-64 59.093333 59.093333 0 0 0-64 59.946666h-81.066667c0-21.333333 10.24-128 144.64-128 142.08 0 142.08 108.586667 142.08 128 0 106.666667-114.346667 119.04-114.346666 220.373334z m-5.546667 103.68a42.666667 42.666667 0 0 1 45.653334-43.946666 42.666667 42.666667 0 0 1 45.866666 43.946666 42.666667 42.666667 0 0 1-45.866666 42.666667 42.666667 42.666667 0 0 1-45.653334-42.666667z" fill="#FFFFFF" p-id="20684"></path></svg>
5 changes: 5 additions & 0 deletions AgentQnA/ui/svelte/src/lib/assets/icons/addKnowledge.svelte
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
Copyright (C) 2025 Intel Corporation
SPDX-License-Identifier: Apache-2.0
-->

<svg
t="1710303075816"
class="icon"
Expand Down
5 changes: 5 additions & 0 deletions AgentQnA/ui/svelte/src/lib/assets/icons/adminKnowledge.svelte
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
Copyright (C) 2025 Intel Corporation
SPDX-License-Identifier: Apache-2.0
-->

<svg
t="1710303147323"
class="icon"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
Copyright (C) 2025 Intel Corporation
SPDX-License-Identifier: Apache-2.0
-->

<script lang="ts">
export let overrideClasses = '';
Expand Down
5 changes: 5 additions & 0 deletions AgentQnA/ui/svelte/src/lib/assets/icons/assistant.svelte
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
Copyright (C) 2025 Intel Corporation
SPDX-License-Identifier: Apache-2.0
-->

<svg
width="45"
height="45"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
Copyright (C) 2025 Intel Corporation
SPDX-License-Identifier: Apache-2.0
-->

<script lang="ts">
export let overrideClasses = '';
Expand Down
5 changes: 5 additions & 0 deletions AgentQnA/ui/svelte/src/lib/assets/icons/chat.svelte
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
<!--
Copyright (C) 2025 Intel Corporation
SPDX-License-Identifier: Apache-2.0
-->

<svg class="w-6 h-6" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" fill="#797a9f"><path d="M512 64c259.2 0 469.333333 200.576 469.333333 448s-210.133333 448-469.333333 448a484.48 484.48 0 0 1-232.725333-58.88l-116.394667 50.645333a42.666667 42.666667 0 0 1-58.517333-49.002666l29.76-125.013334C76.629333 703.402667 42.666667 611.477333 42.666667 512 42.666667 264.576 252.8 64 512 64z m0 64C287.488 128 106.666667 300.586667 106.666667 512c0 79.573333 25.557333 155.434667 72.554666 219.285333l5.525334 7.317334 18.709333 24.192-26.965333 113.237333 105.984-46.08 27.477333 15.018667C370.858667 878.229333 439.978667 896 512 896c224.512 0 405.333333-172.586667 405.333333-384S736.512 128 512 128z m-157.696 341.333333a42.666667 42.666667 0 1 1 0 85.333334 42.666667 42.666667 0 0 1 0-85.333334z m159.018667 0a42.666667 42.666667 0 1 1 0 85.333334 42.666667 42.666667 0 0 1 0-85.333334z m158.997333 0a42.666667 42.666667 0 1 1 0 85.333334 42.666667 42.666667 0 0 1 0-85.333334z"></path></svg>
5 changes: 5 additions & 0 deletions AgentQnA/ui/svelte/src/lib/assets/icons/check-icon.svelte
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
Copyright (C) 2025 Intel Corporation
SPDX-License-Identifier: Apache-2.0
-->

<script lang="ts">
export let overrideClasses = '';
Expand Down
Loading

0 comments on commit 1dca055

Please sign in to comment.