Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion astrbot/core/config/astrbot_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ def __init__(

if not self.check_exist():
"""不存在时载入默认配置"""
self.update(default_config)
self.update(copy.deepcopy(default_config))
if default_config is DEFAULT_CONFIG:
self["dashboard"]["onboarding_pending"] = True
self.save_config(indent=4)
object.__setattr__(self, "first_deploy", True) # 标记第一次部署

Expand Down
1 change: 1 addition & 0 deletions astrbot/core/config/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ def get_local_permission_defaults(system: str | None = None) -> dict:
"pbkdf2_password": "",
"password_storage_upgraded": False,
"password_change_required": False,
"onboarding_pending": False,
"jwt_secret": "",
"host": "0.0.0.0",
"port": 6185,
Expand Down
7 changes: 7 additions & 0 deletions astrbot/dashboard/services/auth_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,17 @@ async def complete_setup(self, post_data: object) -> AuthServiceResult:
except ValueError as exc:
return self.error(str(exc))

# Only a newly created configuration opts in; upgrades default to false.
onboarding_required = self.config["dashboard"].get("onboarding_pending") is True
onboarding_required = onboarding_required and not any(
self.config.get(key) for key in ("platform", "provider", "provider_sources")
)
username = new_username.strip()
self.config["dashboard"]["username"] = username
set_dashboard_password_hashes(self.config, new_password)
await set_password_storage_upgraded(self.db, self.config, True)
await set_password_change_required(self.db, self.config, False)
self.config["dashboard"]["onboarding_pending"] = False
self.config.save_config()

token = self.generate_jwt(username)
Expand All @@ -276,6 +282,7 @@ async def complete_setup(self, post_data: object) -> AuthServiceResult:
"change_pwd_hint": False,
"md5_pwd_hint": False,
"password_upgrade_required": False,
"onboarding_required": onboarding_required,
},
message="Setup completed successfully",
jwt_token=token,
Expand Down
11 changes: 11 additions & 0 deletions changelogs/unreleased.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# Unreleased

- Automatically open onboarding only after account setup on a new installation. Existing configurations, upgrades, password resets, and ordinary logins do not trigger it; manual reentry remains available in Settings.

- WebUI onboarding now ends after four steps: usage notice, model setup, inline ChatUI, and messaging platform. Completing or skipping the platform step opens the welcome screen. Removed the plugin recommendations, computer-access step, and batch-application page, including their requests and state. Plugin installation remains under Plugins -> Plugin Marketplace; permissions remain under Config -> AI -> Capabilities -> Agent Computer Use.
- Animate the two welcome stars along opposite curved paths with individual rotation, fading trails, and a static final logo. Respect reduced-motion preferences.
- Restore the full platform editor on onboarding reentry, including configuration drawers and routing rules. Save route-only edits without rewriting the adapter; preserve route drafts after failures and discard them on skip.
- Limit the onboarding trial composer to text input and Send/Stop. Remove upload, model/configuration selection, and voice controls from the trial only; regular ChatUI keeps its controls.
- WebUI onboarding prefills existing model defaults and messaging adapters in editable forms instead of a status-only adapter list. Unchanged adapters proceed without writes; edits update the selected adapter without duplicating or automatically enabling it. Refined header and footer spacing, full-width advanced settings, a reduced-motion-aware welcome icon animation.

- Generate numbered original-path notices in the image preparation stage during main-agent construction, including quoted images. After request hooks, apply the same size and format policy only to newly introduced image references and refresh their notices. Skipped and captioned attachments retain explicit status without taking a visual index; animation labels identify frame montages.
- Raise the model image input cap from 32 MiB to 64 MiB. Larger originals are skipped before reading image bytes, with a model notice retaining their paths and suggesting the file-reading tool or a smaller upload; accepted inputs still produce images strictly below 512 KiB.
- Local Agent input images are always prepared as JPEG/PNG files strictly below 512 KiB. Compliant local images are reused without copying. Transparent previews retain PNG alpha; animations become 3×3 montages. Original attachment paths remain available to tools, and event-owned previews are deleted after use without a shared conversion cache.
- Configuration mapping: **Enable image compression** (`provider_settings.image_compress_enabled`) is replaced by always-on preparation; **JPEG quality** (`provider_settings.image_compress_options.quality`) is replaced by automatic size control; **Maximum edge length** is renamed to **Input image maximum edge length** (`provider_settings.image_compress_options.max_size`). User attachments in CUA sessions follow the same limits.

- WebUI: Extended initial account setup with the first-use notice, model configuration, unframed inline ChatUI testing, and platform adapters. The wider guide keeps bottom actions visible without installing plugins or changing computer-access permissions. Removed the standalone welcome page and sidebar item; legacy links and ordinary logins go to the dashboard. Reopen the guide from Settings -> Maintenance without resetting configuration.
- WebUI onboarding aligns content and the trial composer with the brand header, opens the trial session automatically, and reuses existing model and platform forms. First-step Set up later is renamed to Skip entire setup; step subtitles use concise configuration descriptions. Primary footer actions consistently read Next and include a forward arrow.
5 changes: 4 additions & 1 deletion dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"generate:api": "rm -rf src/api/generated/openapi-v1 src/api/generated/openapi-v1.ts && openapi-ts -i ../openspec/openapi-v1.yaml -o src/api/generated/openapi-v1 -c @hey-api/client-axios",
"generate:docs:openapi": "uv run python ../docs/scripts/update_openapi_json.py",
"typecheck": "vue-tsc --noEmit",
"test:e2e:onboarding": "node --test --test-concurrency=1 tests/e2e/onboarding.real.test.mjs",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore"
},
"dependencies": {
Expand All @@ -23,7 +24,7 @@
"@tiptap/vue-3": "2.1.7",
"apexcharts": "3.42.0",
"axios": "1.13.5",
"axios-mock-adapter": "^1.22.0",
"canvas-confetti": "1.9.4",
"chance": "1.1.11",
"date-fns": "2.30.0",
"dompurify": "^3.3.2",
Expand Down Expand Up @@ -54,6 +55,7 @@
"@hey-api/openapi-ts": "0.60.0",
"@mdi/font": "7.2.96",
"@rushstack/eslint-patch": "1.3.3",
"@types/canvas-confetti": "^1.9.0",
"@types/chance": "1.1.3",
"@types/dompurify": "^3.0.5",
"@types/markdown-it": "^14.1.2",
Expand All @@ -64,6 +66,7 @@
"@vue/tsconfig": "^0.4.0",
"eslint": "8.48.0",
"eslint-plugin-vue": "9.17.0",
"playwright": "1.63.0",
"prettier": "3.0.2",
"sass": "1.66.1",
"sass-loader": "13.3.2",
Expand Down
55 changes: 35 additions & 20 deletions dashboard/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dashboard/src/api/generated/openapi-v1/sdk.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export const getAuthSetupStatus = <ThrowOnError extends boolean = false>(options

/**
* Complete first-run dashboard account setup
* Successful responses include data.onboarding_required, true only for a new installation without configured models or platforms. Missing or false means no automatic onboarding.
*/
export const setupAuth = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<SetupAuthData, ThrowOnError>) => {
return (options?.client ?? client).post<SetupAuthResponse, SetupAuthError, ThrowOnError>({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Auto-generated MDI subset – 265 icons */
/* Auto-generated MDI subset – 264 icons */
/* Do not edit manually. Run: pnpm run subset-icons */

@font-face {
Expand Down Expand Up @@ -528,10 +528,6 @@
content: "\F02A4";
}

.mdi-hand-heart::before {
content: "\F10F1";
}

.mdi-help-circle-outline::before {
content: "\F0625";
}
Expand Down
Binary file not shown.
Binary file not shown.
Loading
Loading