mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-05-19 08:00:25 +00:00
* ci: add workflow to publish webui to Hugging Face bucket * ci: add webui release job to release workflow * ci: test webui release job * chore: Return to default minification strategy for build output files * ci: extract webui build into separate workflow and job * chore: Ignore webui static output + clean up references * chore: Delete legacy webui static output * chore: Ignore webui build static output * fix: Workflow * fix: Versioning naming * chore: Update package name * test: Test CI fix * refactor: Naming * server: implement webui build strategy with HF Bucket support * chore: Remove test workflow * chore: Use WebUI build workflow call in other workflows * server: HF Buckets fallback for WebUI build * refactor: App name variable * refactor: Naming * fix: Retrieve loading.html * fix: workflow syntax * fix: Rewrite malformed release.yml * fix: Req param * test: Re-add missing Playwright installation for CI tests * refactor: Logic & security improvements * refactor: Retrieve publishing jobs and DRY the workflows * fix: Test workflow syntax * fix: Upstream Release Tag for test workflow * chore: Remove test workflow * ci: Run WebUI jobs on `ubuntu-24.04-arm` * refactor: Post-CR cleanup Co-authored-by: Sigbjørn Skjæret <sigbjorn.skjaeret@scala.com> Co-authored-by: Aleksander Grygier <aleksander.grygier@gmail.com> * refactor: CI cleanup * refactor: Cleanup * test: Test workflow * refactor: use LLAMA_BUILD_NUMBER instead of LLAMA_BUILD_TAG for HF Bucket webui downloads * server: add fallback mechanism for HF Bucket webui downloads from latest directory * fix: Incorrect argument order in file(SHA256) calls for checksum verification * refactor: Use cmake script for handling the HF Bucket download on build time * feat: support local npm build for WebUI assets * refactor: add `HF_ENABLED` flag to control WebUI build/download provisioning * refactor: Cleanup * chore: Remove test workflow * fix: remove s390x from release workflow * fix: add webui-build dependency to ubuntu-22-rocm and windows-hip * Revert "fix: remove s390x from release workflow" This reverts commit debcfffa9bc1e3112eae41f2d29741b682e4eb19. * fix: Release workflow file * fix: Proper release tag used for HF Bucket upload * fix: Remove duplicate steps in release workflow --------- Co-authored-by: Sigbjørn Skjæret <sigbjorn.skjaeret@scala.com>
105 lines
2.3 KiB
TypeScript
105 lines
2.3 KiB
TypeScript
import tailwindcss from '@tailwindcss/vite';
|
|
import { sveltekit } from '@sveltejs/kit/vite';
|
|
import { dirname, resolve } from 'path';
|
|
import { fileURLToPath } from 'url';
|
|
|
|
import { defineConfig, searchForWorkspaceRoot } from 'vite';
|
|
import devtoolsJson from 'vite-plugin-devtools-json';
|
|
import { storybookTest } from '@storybook/addon-vitest/vitest-plugin';
|
|
import { llamaCppBuildPlugin } from './scripts/vite-plugin-llama-cpp-build';
|
|
|
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
|
|
export default defineConfig({
|
|
resolve: {
|
|
alias: {
|
|
'katex-fonts': resolve('node_modules/katex/dist/fonts')
|
|
}
|
|
},
|
|
|
|
build: {
|
|
assetsInlineLimit: 32000,
|
|
chunkSizeWarningLimit: 3072,
|
|
minify: true
|
|
},
|
|
|
|
css: {
|
|
preprocessorOptions: {
|
|
scss: {
|
|
additionalData: `
|
|
$use-woff2: true;
|
|
$use-woff: false;
|
|
$use-ttf: false;
|
|
`
|
|
}
|
|
}
|
|
},
|
|
|
|
plugins: [tailwindcss(), sveltekit(), devtoolsJson(), llamaCppBuildPlugin()],
|
|
|
|
test: {
|
|
projects: [
|
|
{
|
|
extends: './vite.config.ts',
|
|
test: {
|
|
name: 'client',
|
|
environment: 'browser',
|
|
browser: {
|
|
enabled: true,
|
|
provider: 'playwright',
|
|
instances: [{ browser: 'chromium' }]
|
|
},
|
|
include: ['tests/client/**/*.svelte.{test,spec}.{js,ts}'],
|
|
setupFiles: ['./vitest-setup-client.ts']
|
|
}
|
|
},
|
|
|
|
{
|
|
extends: './vite.config.ts',
|
|
test: {
|
|
name: 'unit',
|
|
environment: 'node',
|
|
include: ['tests/unit/**/*.{test,spec}.{js,ts}']
|
|
}
|
|
},
|
|
|
|
{
|
|
extends: './vite.config.ts',
|
|
test: {
|
|
name: 'ui',
|
|
environment: 'browser',
|
|
browser: {
|
|
enabled: true,
|
|
provider: 'playwright',
|
|
instances: [{ browser: 'chromium', headless: true }]
|
|
},
|
|
include: ['tests/stories/**/*.stories.{js,ts,svelte}'],
|
|
setupFiles: ['./.storybook/vitest.setup.ts']
|
|
},
|
|
plugins: [
|
|
storybookTest({
|
|
storybookScript: 'pnpm run storybook --no-open'
|
|
})
|
|
]
|
|
}
|
|
]
|
|
},
|
|
|
|
server: {
|
|
proxy: {
|
|
'/v1': 'http://localhost:8080',
|
|
'/props': 'http://localhost:8080',
|
|
'/models': 'http://localhost:8080',
|
|
'/tools': 'http://localhost:8080',
|
|
'/slots': 'http://localhost:8080',
|
|
'/cors-proxy': 'http://localhost:8080'
|
|
},
|
|
headers: {
|
|
'Cross-Origin-Embedder-Policy': 'require-corp',
|
|
'Cross-Origin-Opener-Policy': 'same-origin'
|
|
},
|
|
fs: {
|
|
allow: [searchForWorkspaceRoot(process.cwd()), resolve(__dirname, 'tests')]
|
|
}
|
|
}
|
|
});
|