From 7927f4ca2bf66ab1f490ba71b19ba33793645647 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Victor=20Mu=C5=A1tar?= Date: Fri, 18 Jul 2025 19:09:59 +0200 Subject: [PATCH 01/12] feat: add Hugging Face logo asset --- .../images/model-provider/huggingface.svg | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 web-app/public/images/model-provider/huggingface.svg diff --git a/web-app/public/images/model-provider/huggingface.svg b/web-app/public/images/model-provider/huggingface.svg new file mode 100644 index 000000000..0af6921f9 --- /dev/null +++ b/web-app/public/images/model-provider/huggingface.svg @@ -0,0 +1,29 @@ + From 54c1bf69500f6e558dbdb156e84c65582494a0d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Victor=20Mu=C5=A1tar?= Date: Fri, 18 Jul 2025 19:10:14 +0200 Subject: [PATCH 02/12] feat: add Hugging Face engine configuration and model definitions --- .../models/huggingface.json | 47 +++++++++++++++++++ .../resources/huggingface.json | 23 +++++++++ 2 files changed, 70 insertions(+) create mode 100644 extensions/engine-management-extension/models/huggingface.json create mode 100644 extensions/engine-management-extension/resources/huggingface.json diff --git a/extensions/engine-management-extension/models/huggingface.json b/extensions/engine-management-extension/models/huggingface.json new file mode 100644 index 000000000..d4bf92688 --- /dev/null +++ b/extensions/engine-management-extension/models/huggingface.json @@ -0,0 +1,47 @@ +[ + { + "model": "moonshotai/Kimi-K2-Instruct:groq", + "object": "model", + "name": "Kimi-K2-Instruct", + "version": "1.0", + "description": "Moonshot's Kimi K2 model with 131k context and tool calling support", + "inference_params": { + "temperature": 0.6, + "top_p": 1.0, + "frequency_penalty": 0, + "presence_penalty": 0, + "stream": true + }, + "engine": "huggingface" + }, + { + "model": "deepseek-ai/DeepSeek-R1-0528", + "object": "model", + "name": "DeepSeek-R1-0528", + "version": "1.0", + "description": "DeepSeek's reasoning model with 163k context, tool calling support, and open weights", + "inference_params": { + "temperature": 0.6, + "top_p": 0.95, + "frequency_penalty": 0, + "presence_penalty": 0, + "stream": true + }, + "engine": "huggingface" + }, + { + "model": "deepseek-ai/DeepSeek-V3-0324", + "object": "model", + "name": "DeepSeek-V3-0324", + "version": "1.0", + "description": "DeepSeek V3 with 16k context, tool calling support, and open weights", + "inference_params": { + "temperature": 0.3, + "top_p": 0.95, + "frequency_penalty": 0, + "presence_penalty": 0, + "stream": true + }, + "engine": "huggingface" + } +] diff --git a/extensions/engine-management-extension/resources/huggingface.json b/extensions/engine-management-extension/resources/huggingface.json new file mode 100644 index 000000000..6a161b65a --- /dev/null +++ b/extensions/engine-management-extension/resources/huggingface.json @@ -0,0 +1,23 @@ +{ + "id": "huggingface", + "type": "remote", + "engine": "huggingface", + "url": "https://huggingface.co/settings/tokens", + "api_key": "", + "metadata": { + "get_models_url": "https://router.huggingface.co/v1/models", + "header_template": "Authorization: Bearer {{api_key}}", + "transform_req": { + "chat_completions": { + "url": "https://router.huggingface.co/v1/chat/completions", + "template": "{ {% set first = true %} {% for key, value in input_request %} {% if key == \"messages\" or key == \"model\" or key == \"temperature\" or key == \"store\" or key == \"max_tokens\" or key == \"stream\" or key == \"presence_penalty\" or key == \"metadata\" or key == \"frequency_penalty\" or key == \"tools\" or key == \"tool_choice\" or key == \"logprobs\" or key == \"top_logprobs\" or key == \"logit_bias\" or key == \"n\" or key == \"modalities\" or key == \"prediction\" or key == \"response_format\" or key == \"service_tier\" or key == \"seed\" or key == \"stop\" or key == \"stream_options\" or key == \"top_p\" or key == \"parallel_tool_calls\" or key == \"user\" %} {% if not first %},{% endif %} \"{{ key }}\": {{ tojson(value) }} {% set first = false %} {% endif %} {% endfor %} }" + } + }, + "transform_resp": { + "chat_completions": { + "template": "{{tojson(input_request)}}" + } + }, + "explore_models_url": "https://huggingface.co/models?pipeline_tag=text-generation&inference_provider=all" + } +} From 178d1546fe6ec646111f5ee81384cc179f6a2b60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Victor=20Mu=C5=A1tar?= Date: Fri, 18 Jul 2025 19:10:30 +0200 Subject: [PATCH 03/12] feat: integrate Hugging Face provider into web app and engine management --- .../engine-management-extension/engines.mjs | 4 ++ web-app/src/lib/utils.ts | 4 ++ web-app/src/mock/data.ts | 60 +++++++++++++++++++ 3 files changed, 68 insertions(+) diff --git a/extensions/engine-management-extension/engines.mjs b/extensions/engine-management-extension/engines.mjs index eafe8a09c..b63bc6b52 100644 --- a/extensions/engine-management-extension/engines.mjs +++ b/extensions/engine-management-extension/engines.mjs @@ -3,6 +3,7 @@ import cohere from './resources/cohere.json' with { type: 'json' } import openai from './resources/openai.json' with { type: 'json' } import openrouter from './resources/openrouter.json' with { type: 'json' } import groq from './resources/groq.json' with { type: 'json' } +import huggingface from './resources/huggingface.json' with { type: 'json' } import martian from './resources/martian.json' with { type: 'json' } import mistral from './resources/mistral.json' with { type: 'json' } import nvidia from './resources/nvidia.json' with { type: 'json' } @@ -14,6 +15,7 @@ import cohereModels from './models/cohere.json' with { type: 'json' } import openaiModels from './models/openai.json' with { type: 'json' } import openrouterModels from './models/openrouter.json' with { type: 'json' } import groqModels from './models/groq.json' with { type: 'json' } +import huggingfaceModels from './models/huggingface.json' with { type: 'json' } import martianModels from './models/martian.json' with { type: 'json' } import mistralModels from './models/mistral.json' with { type: 'json' } import nvidiaModels from './models/nvidia.json' with { type: 'json' } @@ -26,6 +28,7 @@ const engines = [ cohere, openrouter, groq, + huggingface, mistral, martian, nvidia, @@ -38,6 +41,7 @@ const models = [ ...cohereModels, ...openrouterModels, ...groqModels, + ...huggingfaceModels, ...mistralModels, ...martianModels, ...nvidiaModels, diff --git a/web-app/src/lib/utils.ts b/web-app/src/lib/utils.ts index b193257f2..168798f45 100644 --- a/web-app/src/lib/utils.ts +++ b/web-app/src/lib/utils.ts @@ -11,6 +11,8 @@ export function getProviderLogo(provider: string) { return '/images/model-provider/llamacpp.svg' case 'anthropic': return '/images/model-provider/anthropic.svg' + case 'huggingface': + return '/images/model-provider/huggingface.svg' case 'mistral': return '/images/model-provider/mistral.svg' case 'martian': @@ -46,6 +48,8 @@ export const getProviderTitle = (provider: string) => { return 'OpenRouter' case 'gemini': return 'Gemini' + case 'huggingface': + return 'Hugging Face' default: return provider.charAt(0).toUpperCase() + provider.slice(1) } diff --git a/web-app/src/mock/data.ts b/web-app/src/mock/data.ts index 3610eab97..7e1d586fb 100644 --- a/web-app/src/mock/data.ts +++ b/web-app/src/mock/data.ts @@ -281,4 +281,64 @@ export const predefinedProviders = [ ], models: [], }, + { + active: true, + api_key: '', + base_url: 'https://router.huggingface.co/v1', + explore_models_url: + 'https://huggingface.co/models?pipeline_tag=text-generation&inference_provider=all', + provider: 'huggingface', + settings: [ + { + key: 'api-key', + title: 'API Key', + description: + "The Hugging Face API uses tokens for authentication. Visit your [Access Tokens](https://huggingface.co/settings/tokens) page to retrieve the token you'll use in your requests.", + controller_type: 'input', + controller_props: { + placeholder: 'Insert API Token', + value: '', + type: 'password', + input_actions: ['unobscure', 'copy'], + }, + }, + { + key: 'base-url', + title: 'Base URL', + description: + 'The base endpoint to use. See the [Hugging Face Inference Providers documentation](https://huggingface.co/docs/inference-providers) for more information.', + controller_type: 'input', + controller_props: { + placeholder: 'https://router.huggingface.co/v1', + value: 'https://router.huggingface.co/v1', + }, + }, + ], + models: [ + { + id: 'moonshotai/Kimi-K2-Instruct:groq', + name: 'Kimi-K2-Instruct', + version: '1.0', + description: + "Moonshot's Kimi K2 model with 131k context and tool calling support", + capabilities: ['completion', 'tools'], + }, + { + id: 'deepseek-ai/DeepSeek-R1-0528', + name: 'DeepSeek-R1-0528', + version: '1.0', + description: + "DeepSeek's reasoning model with 163k context, tool calling support, and open weights", + capabilities: ['completion', 'tools'], + }, + { + id: 'deepseek-ai/DeepSeek-V3-0324', + name: 'DeepSeek-V3-0324', + version: '1.0', + description: + 'DeepSeek V3 with 16k context, tool calling support, and open weights', + capabilities: ['completion', 'tools'], + }, + ], + }, ] From 6ce26b7b6d9e89418b09d90e4e967331908a5ba2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Victor=20Mu=C5=A1tar?= Date: Fri, 18 Jul 2025 19:31:07 +0200 Subject: [PATCH 04/12] chore: update model descriptions for clarity and accuracy --- web-app/src/mock/data.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web-app/src/mock/data.ts b/web-app/src/mock/data.ts index 7e1d586fb..9f40177bb 100644 --- a/web-app/src/mock/data.ts +++ b/web-app/src/mock/data.ts @@ -320,7 +320,7 @@ export const predefinedProviders = [ name: 'Kimi-K2-Instruct', version: '1.0', description: - "Moonshot's Kimi K2 model with 131k context and tool calling support", + '1T parameters Moonshot chat model tuned for tool-aware, nuanced responses.', capabilities: ['completion', 'tools'], }, { @@ -328,7 +328,7 @@ export const predefinedProviders = [ name: 'DeepSeek-R1-0528', version: '1.0', description: - "DeepSeek's reasoning model with 163k context, tool calling support, and open weights", + "DeepSeek's flagship reasoning engine with open weights and advanced tool control.", capabilities: ['completion', 'tools'], }, { @@ -336,7 +336,7 @@ export const predefinedProviders = [ name: 'DeepSeek-V3-0324', version: '1.0', description: - 'DeepSeek V3 with 16k context, tool calling support, and open weights', + 'Streamlined DeepSeek model focused on fast, high-quality completions and tool use.', capabilities: ['completion', 'tools'], }, ], From 18dfe2b88349edfc6ec20441baf774c18759886c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Victor=20Mu=C5=A1tar?= Date: Fri, 18 Jul 2025 19:53:12 +0200 Subject: [PATCH 05/12] chore: update model descriptions in huggingface.json to match web app mock data --- .../engine-management-extension/models/huggingface.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/engine-management-extension/models/huggingface.json b/extensions/engine-management-extension/models/huggingface.json index d4bf92688..322727825 100644 --- a/extensions/engine-management-extension/models/huggingface.json +++ b/extensions/engine-management-extension/models/huggingface.json @@ -4,7 +4,7 @@ "object": "model", "name": "Kimi-K2-Instruct", "version": "1.0", - "description": "Moonshot's Kimi K2 model with 131k context and tool calling support", + "description": "1T parameters Moonshot chat model tuned for tool-aware, nuanced responses.", "inference_params": { "temperature": 0.6, "top_p": 1.0, @@ -19,7 +19,7 @@ "object": "model", "name": "DeepSeek-R1-0528", "version": "1.0", - "description": "DeepSeek's reasoning model with 163k context, tool calling support, and open weights", + "description": "DeepSeek's flagship reasoning engine with open weights and advanced tool control.", "inference_params": { "temperature": 0.6, "top_p": 0.95, @@ -34,7 +34,7 @@ "object": "model", "name": "DeepSeek-V3-0324", "version": "1.0", - "description": "DeepSeek V3 with 16k context, tool calling support, and open weights", + "description": "Streamlined DeepSeek model focused on fast, high-quality completions and tool use.", "inference_params": { "temperature": 0.3, "top_p": 0.95, From 4d0b777f9fe8046ad24fa6b01ecbb5a3d019a023 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 20 Jul 2025 15:20:18 +0700 Subject: [PATCH 06/12] chore(deps): bump @radix-ui/react-hover-card from 1.1.11 to 1.1.14 (#5603) --- updated-dependencies: - dependency-name: "@radix-ui/react-hover-card" dependency-version: 1.1.14 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- web-app/package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/web-app/package.json b/web-app/package.json index 9dae69670..44a4c8fd3 100644 --- a/web-app/package.json +++ b/web-app/package.json @@ -19,7 +19,7 @@ "@radix-ui/react-accordion": "^1.2.10", "@radix-ui/react-dialog": "^1.1.11", "@radix-ui/react-dropdown-menu": "^2.1.11", - "@radix-ui/react-hover-card": "^1.1.11", + "@radix-ui/react-hover-card": "^1.1.14", "@radix-ui/react-popover": "^1.1.13", "@radix-ui/react-progress": "^1.1.4", "@radix-ui/react-slider": "^1.3.2", diff --git a/yarn.lock b/yarn.lock index cf44126fe..7fe035c24 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2572,7 +2572,7 @@ __metadata: "@radix-ui/react-accordion": "npm:^1.2.10" "@radix-ui/react-dialog": "npm:^1.1.11" "@radix-ui/react-dropdown-menu": "npm:^2.1.11" - "@radix-ui/react-hover-card": "npm:^1.1.11" + "@radix-ui/react-hover-card": "npm:^1.1.14" "@radix-ui/react-popover": "npm:^1.1.13" "@radix-ui/react-progress": "npm:^1.1.4" "@radix-ui/react-slider": "npm:^1.3.2" @@ -3889,18 +3889,18 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-hover-card@npm:^1.1.11": - version: 1.1.11 - resolution: "@radix-ui/react-hover-card@npm:1.1.11" +"@radix-ui/react-hover-card@npm:^1.1.14": + version: 1.1.14 + resolution: "@radix-ui/react-hover-card@npm:1.1.14" dependencies: "@radix-ui/primitive": "npm:1.1.2" "@radix-ui/react-compose-refs": "npm:1.1.2" "@radix-ui/react-context": "npm:1.1.2" - "@radix-ui/react-dismissable-layer": "npm:1.1.7" - "@radix-ui/react-popper": "npm:1.2.4" - "@radix-ui/react-portal": "npm:1.1.6" + "@radix-ui/react-dismissable-layer": "npm:1.1.10" + "@radix-ui/react-popper": "npm:1.2.7" + "@radix-ui/react-portal": "npm:1.1.9" "@radix-ui/react-presence": "npm:1.1.4" - "@radix-ui/react-primitive": "npm:2.1.0" + "@radix-ui/react-primitive": "npm:2.1.3" "@radix-ui/react-use-controllable-state": "npm:1.2.2" peerDependencies: "@types/react": "*" @@ -3912,7 +3912,7 @@ __metadata: optional: true "@types/react-dom": optional: true - checksum: 10c0/bb309a27a37edad7c31a7d8ec392d27f0d62fafb0011624f0dbc607038773091e2981c68aefb96eb24ec3bc18b390a0f8acabe011e6ef57e979e0e72140f6e0e + checksum: 10c0/f352bab22dd81ac2ef1140ca1a8426913010851becd03df9d8b8476bdf6ef7001f0559f6a61c4f98ff8033d6cedacd4c86ad47e4c391385254430e266329a2a0 languageName: node linkType: hard From 04f8bf0903bb232cd49186be41e7307a27f8b1f0 Mon Sep 17 00:00:00 2001 From: Trang Le Date: Sun, 20 Jul 2025 15:20:53 +0700 Subject: [PATCH 07/12] Update mcp.mdx (#5771) The original instruction doesn't tell users to enable experimental features in Jan first. Without it, the MCP Servers tab won't appear. --- docs/src/pages/docs/mcp.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/pages/docs/mcp.mdx b/docs/src/pages/docs/mcp.mdx index b496a19ed..03eaa0556 100644 --- a/docs/src/pages/docs/mcp.mdx +++ b/docs/src/pages/docs/mcp.mdx @@ -124,7 +124,7 @@ you will need to wait for a response). Efficient management of tools and their o To illustrate how MCPs can be used within Jan, we will walk through an example using the [Browser MCP](https://browsermcp.io/). -Before we begin, you will need to enable Jan's MCP functionality at `Settings` > `MCP Servers`, and toggle +Before we begin, you will need to enable experimental features at `General` > `Advanced`. Next, go to `Settings` > `MCP Servers`, and toggle the `Allow All MCP Tool Permission` switch ON. ![Turn on the MCP Host](./_assets/mcp-on.png) From 722a6881fdca47181c2184a0b62a26ec25d014d0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 20 Jul 2025 16:11:43 +0700 Subject: [PATCH 08/12] chore(deps): update rand requirement from 0.8 to 0.9 in /src-tauri (#5399) Updates the requirements on [rand](https://github.com/rust-random/rand) to permit the latest version. - [Release notes](https://github.com/rust-random/rand/releases) - [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-random/rand/compare/0.8.0...rand_core-0.9.1) --- updated-dependencies: - dependency-name: rand dependency-version: 0.9.1 dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src-tauri/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 7068ffba6..4334302a8 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -28,7 +28,7 @@ tauri-plugin-os = "2.2.1" tauri-plugin-opener = "2.2.7" flate2 = "1.0" tar = "0.4" -rand = "0.8" +rand = "0.9" tauri-plugin-http = { version = "2", features = ["unsafe-headers"] } tauri-plugin-store = "2" hyper = { version = "0.14", features = ["server"] } From 05a5995865a327f08e1628e611dfa5c54967a846 Mon Sep 17 00:00:00 2001 From: Louis Date: Sun, 20 Jul 2025 16:55:40 +0700 Subject: [PATCH 09/12] fix: dependabot should just update security patch (#5814) --- .github/dependabot.yaml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml index 324ab3702..9aac528a5 100644 --- a/.github/dependabot.yaml +++ b/.github/dependabot.yaml @@ -1,17 +1,19 @@ # https://docs.github.com/en/code-security/dependabot/working-with-dependabot/dependabot-options-reference#package-ecosystem- version: 2 updates: - - package-ecosystem: "cargo" - directory: "src-tauri" + - package-ecosystem: 'cargo' + directory: 'src-tauri' schedule: - interval: "weekly" - - package-ecosystem: "npm" + interval: 'weekly' + open-pull-requests-limit: 0 + - package-ecosystem: 'npm' directories: - - "/" - - "core" - - "docs" - - "extensions" - - "extensions/*" - - "web-app" + - '/' + - 'core' + - 'docs' + - 'extensions' + - 'extensions/*' + - 'web-app' schedule: - interval: "weekly" + interval: 'weekly' + open-pull-requests-limit: 0 From c03f6fcc3a627c650252c0119210aab944cde660 Mon Sep 17 00:00:00 2001 From: Louis Date: Sun, 20 Jul 2025 23:55:45 +0700 Subject: [PATCH 10/12] =?UTF-8?q?Revert=20"chore(deps):=20update=20rand=20?= =?UTF-8?q?requirement=20from=200.8=20to=200.9=20in=20/src-tauri=20(#?= =?UTF-8?q?=E2=80=A6"=20(#5824)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 722a6881fdca47181c2184a0b62a26ec25d014d0. --- src-tauri/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 4334302a8..7068ffba6 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -28,7 +28,7 @@ tauri-plugin-os = "2.2.1" tauri-plugin-opener = "2.2.7" flate2 = "1.0" tar = "0.4" -rand = "0.9" +rand = "0.8" tauri-plugin-http = { version = "2", features = ["unsafe-headers"] } tauri-plugin-store = "2" hyper = { version = "0.14", features = ["server"] } From 5241557a745ad92aa50b083e34dac13c271fd47b Mon Sep 17 00:00:00 2001 From: Louis Date: Mon, 21 Jul 2025 00:11:16 +0700 Subject: [PATCH 11/12] test: deprecate webdriver test in favor of auto qa using CUA (#5825) --- .github/workflows/jan-linter-and-test.yml | 12 ------ Makefile | 1 - tests-e2e-js/.gitignore | 1 - tests-e2e-js/package.json | 23 ---------- tests-e2e-js/src/main.ts | 51 ----------------------- tests-e2e-js/tsconfig.json | 21 ---------- 6 files changed, 109 deletions(-) delete mode 100644 tests-e2e-js/.gitignore delete mode 100644 tests-e2e-js/package.json delete mode 100644 tests-e2e-js/src/main.ts delete mode 100644 tests-e2e-js/tsconfig.json diff --git a/.github/workflows/jan-linter-and-test.yml b/.github/workflows/jan-linter-and-test.yml index e09c23f04..45888336e 100644 --- a/.github/workflows/jan-linter-and-test.yml +++ b/.github/workflows/jan-linter-and-test.yml @@ -114,10 +114,6 @@ jobs: with: node-version: 20 - - name: Install tauri-driver dependencies - run: | - cargo install tauri-driver --locked - # Clean cache, continue on error - name: 'Cleanup cache' shell: powershell @@ -154,10 +150,6 @@ jobs: with: node-version: 20 - - name: Install tauri-driver dependencies - run: | - cargo install tauri-driver --locked - - name: 'Cleanup cache' shell: powershell continue-on-error: true @@ -202,10 +194,6 @@ jobs: sudo apt update sudo apt install -y libglib2.0-dev libatk1.0-dev libpango1.0-dev libgtk-3-dev libsoup-3.0-dev libwebkit2gtk-4.1-dev librsvg2-dev libfuse2 webkit2gtk-driver - - name: Install tauri-driver dependencies - run: | - cargo install tauri-driver --locked - - name: 'Cleanup cache' continue-on-error: true run: | diff --git a/Makefile b/Makefile index 5bd42c755..7754b0d3e 100644 --- a/Makefile +++ b/Makefile @@ -42,7 +42,6 @@ lint: install-and-build # Testing test: lint yarn test - yarn test:e2e # Builds and publishes the app build-and-publish: install-and-build diff --git a/tests-e2e-js/.gitignore b/tests-e2e-js/.gitignore deleted file mode 100644 index 1521c8b76..000000000 --- a/tests-e2e-js/.gitignore +++ /dev/null @@ -1 +0,0 @@ -dist diff --git a/tests-e2e-js/package.json b/tests-e2e-js/package.json deleted file mode 100644 index e7dc18587..000000000 --- a/tests-e2e-js/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "tests-e2-js", - "version": "0.0.0", - "private": true, - "type": "module", - "main": "src/main.ts", - "scripts": { - "build": "tsc", - "test": "node --test --test-force-exit --loader ts-node/esm ./src/main.ts" - }, - "dependencies": { - "@tauri-e2e/selenium": "0.2.2", - "log4js": "^6.9.1", - "selenium-webdriver": "^4.22.0", - "ts-node": "^10.9.2" - }, - "devDependencies": { - "@types/node": "^20.14.9", - "@types/selenium-webdriver": "^4.1.28", - "tsimp": "^2.0.11", - "typescript": "^5.5.2" - } -} diff --git a/tests-e2e-js/src/main.ts b/tests-e2e-js/src/main.ts deleted file mode 100644 index c6e0aeba6..000000000 --- a/tests-e2e-js/src/main.ts +++ /dev/null @@ -1,51 +0,0 @@ -import assert from 'node:assert' -import { ChildProcess } from 'node:child_process' -import { afterEach, beforeEach, describe, test } from 'node:test' -import { By, until, WebDriver } from 'selenium-webdriver' -import * as e2e from '@tauri-e2e/selenium' -import { default as log4js } from 'log4js' - -let logger = log4js.getLogger() -logger.level = 'debug' - -process.env.TAURI_WEBDRIVER_LOGLEVEL = 'debug' -process.env.TAURI_WEBDRIVER_BINARY = await e2e.install.PlatformDriver() -process.env.TAURI_SELENIUM_BINARY = '../src-tauri/target/release/Jan.exe' -process.env.SELENIUM_REMOTE_URL = 'http://127.0.0.1:6655' - -//@ts-ignore fuck you javascript -e2e.setLogger(logger) - -describe('Tauri E2E tests', async () => { - let driver: WebDriver - let webDriver: ChildProcess - - beforeEach(async () => { - // Spawn WebDriver process. - webDriver = await e2e.launch.spawnWebDriver() - // wait 1 second - await new Promise((r) => setTimeout(r, 1000)) - // Create driver session. - driver = new e2e.selenium.Builder().build() - // Wait for the body element to be present - // await driver.wait(until.elementLocated({ css: 'body' })) - }) - - afterEach(async () => { - await e2e.selenium.cleanupSession(driver) - e2e.launch.killWebDriver(webDriver) - }) - - test('Find hub', async () => { - const hub = until.elementLocated(By.css('[data-test-id="menu-common:hub"')) - // console.log('GG', hub) - // @ts-ignore - await driver.wait(hub.fn, 120000) - - const menuElement = await driver.findElement({ - css: '[data-test-id="menu-common:hub"]', - }) - assert(menuElement !== null, 'Hub menu element should be available') - await menuElement.isDisplayed() - }) -}) diff --git a/tests-e2e-js/tsconfig.json b/tests-e2e-js/tsconfig.json deleted file mode 100644 index 6189f7d38..000000000 --- a/tests-e2e-js/tsconfig.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "compilerOptions": { - "outDir": "./dist", - "rootDir": "./src", - "target": "ESNext", - "module": "ESNext", - "moduleResolution": "Bundler", - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "strict": true, - "declaration": true, - "declarationMap": true - }, - "include": [ - "src/*.ts" - ], - "exclude": [ - "node_modules", - "dist" - ], -} From e82e5e1da945c3fd25848d1b401359f4e05c26d8 Mon Sep 17 00:00:00 2001 From: Nguyen Ngoc Minh <91668012+Minh141120@users.noreply.github.com> Date: Mon, 21 Jul 2025 10:01:48 -0700 Subject: [PATCH 12/12] refactor: standardize build process and remove build-tauri target (#5846) --- .github/workflows/template-tauri-build-linux-x64.yml | 2 +- .github/workflows/template-tauri-build-macos.yml | 2 +- .github/workflows/template-tauri-build-windows-x64.yml | 2 +- Makefile | 4 ---- mise.toml | 5 ----- 5 files changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/template-tauri-build-linux-x64.yml b/.github/workflows/template-tauri-build-linux-x64.yml index e2ce4d841..39a649b03 100644 --- a/.github/workflows/template-tauri-build-linux-x64.yml +++ b/.github/workflows/template-tauri-build-linux-x64.yml @@ -143,7 +143,7 @@ jobs: fi - name: Build app run: | - make build-tauri + make build APP_IMAGE=./src-tauri/target/release/bundle/appimage/$(ls ./src-tauri/target/release/bundle/appimage/ | grep AppImage | head -1) yarn tauri signer sign \ diff --git a/.github/workflows/template-tauri-build-macos.yml b/.github/workflows/template-tauri-build-macos.yml index 2679638c4..40cf4e839 100644 --- a/.github/workflows/template-tauri-build-macos.yml +++ b/.github/workflows/template-tauri-build-macos.yml @@ -168,7 +168,7 @@ jobs: - name: Build app run: | rustup target add x86_64-apple-darwin - make build-tauri + make build env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} APP_PATH: '.' diff --git a/.github/workflows/template-tauri-build-windows-x64.yml b/.github/workflows/template-tauri-build-windows-x64.yml index a2ce5a39a..d6b15ca14 100644 --- a/.github/workflows/template-tauri-build-windows-x64.yml +++ b/.github/workflows/template-tauri-build-windows-x64.yml @@ -181,7 +181,7 @@ jobs: curl -L -o ./src-tauri/binaries/vcomp140.dll https://catalog.jan.ai/vcomp140.dll curl -L -o ./src-tauri/binaries/msvcp140_codecvt_ids.dll https://catalog.jan.ai/msvcp140_codecvt_ids.dll ls ./src-tauri/binaries - make build-tauri + make build env: AZURE_KEY_VAULT_URI: ${{ secrets.AZURE_KEY_VAULT_URI }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} diff --git a/Makefile b/Makefile index 7754b0d3e..a381fffa3 100644 --- a/Makefile +++ b/Makefile @@ -49,10 +49,6 @@ build-and-publish: install-and-build # Build build: install-and-build - yarn build - -# Deprecated soon -build-tauri: install-and-build yarn copy:lib yarn build diff --git a/mise.toml b/mise.toml index 86a90f742..1e32a9da9 100644 --- a/mise.toml +++ b/mise.toml @@ -77,11 +77,6 @@ run = [ [tasks.build] description = "Build complete application (matches Makefile)" depends = ["install-and-build"] -run = "yarn build" - -[tasks.build-tauri] -description = "Build Tauri application (DEPRECATED - matches Makefile)" -depends = ["install-and-build"] run = [ "yarn copy:lib", "yarn build"