Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
06cf1cd
chore: tooling and build config updates
miaobuao Jun 3, 2026
708a60f
refactor: migrate chatbox and webdav-explorer packages into src/compo…
miaobuao Jun 3, 2026
9cbdcd0
refactor: migrate i18n locale files from TypeScript to JSON
miaobuao Jun 3, 2026
ae32c4d
refactor: restructure sync decision strategies, add local/remote mirr…
miaobuao Jun 3, 2026
c386a07
feat: integrate Nutstore LLM Gateway with provider management and mod…
miaobuao Jun 3, 2026
f5d0739
feat: add session export and improve chat context with user/workspace…
miaobuao Jun 3, 2026
0a7f7d4
feat: add GC service, protocol service, and chunked download support
miaobuao Jun 3, 2026
3711660
chore: misc updates to settings, utils, components, and dependency bump
miaobuao Jun 3, 2026
72a8cd0
fix: filter stale workspace leaves and refresh context on retry
miaobuao Jun 3, 2026
485c549
fix: fall back to adapter when vault metadata cache misses
miaobuao Jun 8, 2026
bd40f1b
feat: surface preset model refresh errors to user and relax shape schema
miaobuao Jun 11, 2026
63fe3b5
refactor: migrate chat messages to ai SDK types and fix UA logic
miaobuao Jun 15, 2026
6b30f9f
refactor: consolidate i18n, unify mount pattern, add display blocks
miaobuao Jun 16, 2026
62578dc
refactor: extract SettingsService, auto-reload on sync changes
miaobuao Jun 16, 2026
65e052c
refactor: consolidate cache/log settings into Troubleshooting page
miaobuao Jun 16, 2026
d472dea
refactor: overhaul logging with structured entries and Error serializ…
miaobuao Jun 16, 2026
7c588cf
refactor: standardize quotes and update pnpm version in CI workflows
miaobuao Jun 16, 2026
b863eb5
feat: support Nutstore Enterprise custom base URL
miaobuao Jun 22, 2026
d6098d8
feat: filter user message content by model input modalities
miaobuao Jun 22, 2026
6fbe62f
feat: collapse message headers for consecutive same-model assistant/t…
miaobuao Jun 22, 2026
9b66818
feat: add context file drag-and-drop support
miaobuao Jun 23, 2026
dc09ff1
feat: expand sync policies from 3 to 5 modes with send/receive variants
miaobuao Jun 23, 2026
517a842
feat: add confirm dialogs for new fragment and compress context
miaobuao Jun 23, 2026
39de3d4
feat: extract context compression into reusable module with auto-comp…
miaobuao Jun 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
packages: read
steps:
- uses: actions/checkout@v3
with:
lfs: true

- name: Use Node.js
uses: actions/setup-node@v3
Expand All @@ -22,13 +24,17 @@ jobs:
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: latest
version: latest-9

- name: Install dependencies
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: pnpm install

- name: Update models API catalog
run: pnpm run update:models-api
continue-on-error: true

- name: Build plugin
env:
NS_NSDAV_ENDPOINT: ${{ vars.NS_NSDAV_ENDPOINT }}
Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:
packages: read
steps:
- uses: actions/checkout@v3
with:
lfs: true

- name: Use Node.js
uses: actions/setup-node@v3
Expand All @@ -25,7 +27,16 @@ jobs:
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: latest
version: latest-9

- name: Install dependencies
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: pnpm install

- name: Update models API catalog
run: pnpm run update:models-api
continue-on-error: true

- name: Build plugin
env:
Expand All @@ -34,9 +45,7 @@ jobs:
NUTSTORE_PAT: ${{ secrets.GITHUB_TOKEN }}
NODE_ENV: production
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pnpm install
pnpm run build
run: pnpm run build

- name: Package plugin
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ node_modules

# obsidian
data.json
data.local.json

# Exclude macOS Finder (System Explorer) View States
.DS_Store
Expand Down
9 changes: 3 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"cSpell.words": ["fflate", "jedec", "Mkdirs", "Nutstore", "webdav"],
"i18n-ally.localesPaths": [
"src/i18n",
"src/i18n/locales",
"packages/webdav-explorer/src/i18n",
"packages/webdav-explorer/src/i18n/locales"
]
"i18n-ally.localesPaths": ["src/i18n/locales"],
"i18n-ally.displayLanguage": "zh",
"i18n-ally.keystyle": "nested"
}
46 changes: 39 additions & 7 deletions esbuild.config.mjs
Original file line number Diff line number Diff line change
@@ -1,16 +1,50 @@
import postcss from '@deanc/esbuild-plugin-postcss'
import UnoCSS from '@unocss/postcss'
import dotenv from 'dotenv'
import esbuild from 'esbuild'
import fs, { readFileSync } from 'fs'
import path from 'path'
import postcss from 'postcss'
import postcssMergeRules from 'postcss-merge-rules'
import process from 'process'
import solid from 'unplugin-solid/esbuild'

const pkgJson = JSON.parse(readFileSync('./package.json', 'utf-8'))
dotenv.config()

const prod = process.argv[2] === 'production'

const postcssPlugin = {
name: 'postcss',
setup(build) {
build.onResolve({ filter: /\.css$/ }, (args) => ({
path: path.resolve(args.resolveDir, args.path),
namespace: 'postcss',
pluginData: {
resolveDir: args.resolveDir || process.cwd(),
importer: args.importer,
},
}))

build.onLoad({ filter: /\.css$/, namespace: 'postcss' }, async (args) => {
const resolvedPath = args.path
const css = await fs.promises.readFile(resolvedPath, 'utf8')
const result = await postcss([UnoCSS(), postcssMergeRules()]).process(
css,
{ from: resolvedPath },
)
const watchFiles = result.messages
.filter((m) => m.type === 'dependency')
.map((m) => m.file)
return {
contents: result.css,
loader: 'css',
watchFiles: [resolvedPath, ...watchFiles],
resolveDir: args.pluginData?.resolveDir,
}
})
},
}

const renamePlugin = {
name: 'rename-plugin',
setup(build) {
Expand Down Expand Up @@ -46,6 +80,9 @@ const context = await esbuild.context({
process.env.NS_NSDAV_ENDPOINT,
),
'process.env.NS_DAV_ENDPOINT': JSON.stringify(process.env.NS_DAV_ENDPOINT),
'process.env.LLM_GATEWAY_CLIENT_ID': JSON.stringify(
process.env.LLM_GATEWAY_CLIENT_ID || '',
),
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || ''),
'process.env.PLUGIN_VERSION': JSON.stringify(pkgJson.version),
},
Expand All @@ -57,12 +94,7 @@ const context = await esbuild.context({
outfile: prod ? 'dist/main.js' : 'main.js',
minify: prod,
platform: 'browser',
plugins: [
postcss({
plugins: [UnoCSS(), postcssMergeRules()],
}),
renamePlugin,
],
plugins: [postcssPlugin, solid(), renamePlugin],
alias: {
'node:zlib': './src/shims/node-zlib.ts',
},
Expand Down
118 changes: 118 additions & 0 deletions eslint.config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
import css from '@eslint/css'
import js from '@eslint/js'
import json from '@eslint/json'
import markdown from '@eslint/markdown'
import * as tsParser from '@typescript-eslint/parser'
import solid from 'eslint-plugin-solid/configs/typescript'
import { defineConfig } from 'eslint/config'
import globals from 'globals'
import tseslint from 'typescript-eslint'

export default defineConfig([
{
ignores: [
'node_modules/**',
'dist/**',
'main.js',
'coverage/**',
'.codegraph/**',
],
},
{
files: ['**/*.{js,mjs,cjs,ts,mts,cts}'],
plugins: { js },
extends: ['js/recommended'],
languageOptions: { globals: globals.browser },
},
{
files: ['scripts/**/*.cjs', '*.mjs'],
languageOptions: { globals: globals.node },
rules: {
'@typescript-eslint/no-require-imports': 'off',
},
},
// @ts-ignore
{
files: ['**/*.{ts,tsx}'],
...solid,
languageOptions: {
parser: tsParser,
parserOptions: {
project: 'tsconfig.json',
},
},
},
tseslint.configs.recommended,
{
rules: {
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-explicit-any': 'off',
},
},
{
files: ['**/*.test.{ts,tsx}', 'test/**/*.ts'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
},
},
{
files: ['**/*.json'],
ignores: ['tsconfig*.json'],
plugins: { json },
language: 'json/json',
extends: ['json/recommended'],
},
{
files: ['tsconfig*.json'],
plugins: { json },
language: 'json/jsonc',
extends: ['json/recommended'],
},
{
files: ['**/*.jsonc'],
plugins: { json },
language: 'json/jsonc',
extends: ['json/recommended'],
},
{
files: ['**/*.json5'],
plugins: { json },
language: 'json/json5',
extends: ['json/recommended'],
},
{
files: ['**/*.md'],
plugins: { markdown },
language: 'markdown/gfm',
extends: ['markdown/recommended'],
rules: {
'markdown/no-missing-label-refs': 'off',
},
},
{
files: ['**/*.css'],
plugins: { css },
language: 'css/css',
extends: ['css/recommended'],
rules: {
'css/no-invalid-at-rules': 'off',
'css/no-invalid-properties': 'off',
'css/no-important': 'off',
'css/use-baseline': 'off',
},
},
{
files: ['scripts/**/*.cjs'],
rules: {
'@typescript-eslint/no-require-imports': 'off',
},
},
])
13 changes: 13 additions & 0 deletions lefthook.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
pre-commit:
jobs:
- name: prettier frontend
glob: '*.{js,jsx,ts,tsx,mjs,mts,json,md,css,scss,html,yml,yaml}'
exclude:
- 'pnpm-lock.yaml'
stage_fixed: true
run: pnpm prettier --write {staged_files}

- name: lint frontend
glob: '*.{js,jsx,mjs,ts,tsx,mts}'
stage_fixed: true
run: pnpm eslint --fix {staged_files}
Loading
Loading