fix: polish ai provider rebuild feedback
This commit is contained in:
@@ -319,7 +319,6 @@ class ProviderService:
|
||||
)
|
||||
)
|
||||
return blocks
|
||||
|
||||
def _extract_anthropic_content(self, payload: dict[str, Any]) -> str:
|
||||
content = payload.get("content")
|
||||
if isinstance(content, str):
|
||||
@@ -359,6 +358,7 @@ class ProviderService:
|
||||
)
|
||||
return blocks
|
||||
|
||||
|
||||
def _extract_ollama_content(self, payload: dict[str, Any]) -> str:
|
||||
response = payload.get("response")
|
||||
if isinstance(response, str):
|
||||
|
||||
@@ -7,6 +7,23 @@ This project follows the repository versioning rule:
|
||||
- `feature` -> `+0.1.0`
|
||||
- `bugfix` -> `+0.0.1`
|
||||
|
||||
## 0.24.4
|
||||
|
||||
Released: 2026-04-09
|
||||
|
||||
### Highlights
|
||||
|
||||
- Refined the `planet.sh` AI Provider rebuild UX so image rebuilds now feel like first-class scripted tasks, with clearer stage boundaries and cleaner fallback messaging instead of leaking raw Compose output into the terminal.
|
||||
|
||||
### Improved
|
||||
|
||||
- Improved [planet.sh](/home/ray/dev/linkong/planet/planet.sh) by keeping AI Provider image build logs in a temporary file, surfacing stage-specific detail copy for `docker compose v2` and `docker-compose v1`, and showing an explicit success line when the image rebuild finishes before container health checks begin.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed [planet.sh](/home/ray/dev/linkong/planet/planet.sh) so the AI Provider image rebuild stage no longer dumps raw Compose build output into the main spinner flow during normal successful runs.
|
||||
- Fixed [planet.sh](/home/ray/dev/linkong/planet/planet.sh) so the `构建 AI Provider 镜像` phase now ends with an explicit completion signal instead of visually blending into the subsequent container health-check phase.
|
||||
|
||||
## 0.24.3
|
||||
|
||||
Released: 2026-04-09
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
## Current Version
|
||||
|
||||
- `main` 当前主线历史推导到:`0.16.5`
|
||||
- `dev` 当前开发分支历史推导到:`0.24.3`
|
||||
- `dev` 当前开发分支历史推导到:`0.24.4`
|
||||
|
||||
## Timeline
|
||||
|
||||
@@ -76,6 +76,7 @@
|
||||
| `0.24.1` | bugfix | `dev` | `pending` | refactor Earth HUD into class-first CSS layers, unify Bun-only frontend tooling guidance, and auto-bootstrap Bun/uv in `planet.sh` |
|
||||
| `0.24.2` | bugfix | `dev` | `pending` | restore public Earth entry, refresh Playground provider diagnostics correctly, fit help-card content, and split frontend bundles by route/vendor |
|
||||
| `0.24.3` | bugfix | `dev` | `pending` | expand Playground diagnostics presets and result inspection, and make `planet.sh` rebuild changed AI Provider images with explicit Compose fallback reporting |
|
||||
| `0.24.4` | bugfix | `dev` | `pending` | polish `planet.sh` AI Provider rebuild stage boundaries, hide raw Compose build logs on success, and add explicit image-build completion feedback |
|
||||
|
||||
## Maintenance Commits Not Counted as Version Bumps
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "planet-frontend",
|
||||
"version": "0.24.3",
|
||||
"version": "0.24.4",
|
||||
"private": true,
|
||||
"packageManager": "bun@1",
|
||||
"dependencies": {
|
||||
|
||||
42
planet.sh
42
planet.sh
@@ -60,6 +60,7 @@ FRONTEND_RUNTIME_BIN="${FRONTEND_RUNTIME_BIN:-}"
|
||||
FRONTEND_RUNTIME_SOURCE="${FRONTEND_RUNTIME_SOURCE:-}"
|
||||
FRONTEND_PID_FILE="/tmp/planet_frontend.pid"
|
||||
AI_PROVIDER_BUILD_STAMP_FILE="/tmp/planet_aiprovider_build.sha256"
|
||||
AI_PROVIDER_BUILD_LOG_FILE="/tmp/planet_aiprovider_build.log"
|
||||
AI_PROVIDER_IMAGE_NAME="${AI_PROVIDER_IMAGE_NAME:-planet_aiprovider:latest}"
|
||||
AI_PROVIDER_CONTAINER_NAME="${AI_PROVIDER_CONTAINER_NAME:-planet_aiprovider}"
|
||||
AI_PROVIDER_RECREATE_REQUIRED=0
|
||||
@@ -131,7 +132,13 @@ compose_up() {
|
||||
}
|
||||
|
||||
compose_supports_build() {
|
||||
compose_up build --help >/dev/null 2>&1
|
||||
if compose_v2_available; then
|
||||
docker compose build --help >/dev/null 2>&1 && return 0
|
||||
fi
|
||||
if compose_v1_available; then
|
||||
docker-compose build --help >/dev/null 2>&1 && return 0
|
||||
fi
|
||||
return 1
|
||||
}
|
||||
|
||||
# Terminal rendering helpers
|
||||
@@ -468,19 +475,40 @@ ensure_ai_provider_image_current() {
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! run_with_retry \
|
||||
"$AI_PROVIDER_START_MAX_RETRIES" \
|
||||
"$AI_PROVIDER_RETRY_INTERVAL" \
|
||||
"AI Provider 镜像构建失败,已重试 ${AI_PROVIDER_START_MAX_RETRIES} 次" \
|
||||
"构建 AI Provider 镜像" \
|
||||
compose_up build aiprovider; then
|
||||
: > "$AI_PROVIDER_BUILD_LOG_FILE"
|
||||
|
||||
if ! build_ai_provider_image_with_fallback; then
|
||||
clear_wait_spinner
|
||||
log_error "AI Provider 镜像构建失败"
|
||||
tail -20 "$AI_PROVIDER_BUILD_LOG_FILE" 2>/dev/null || true
|
||||
exit 1
|
||||
fi
|
||||
log_success "AI Provider 镜像已构建"
|
||||
|
||||
write_ai_provider_build_stamp "$current_fingerprint"
|
||||
AI_PROVIDER_RECREATE_REQUIRED=1
|
||||
}
|
||||
|
||||
build_ai_provider_image_with_fallback() {
|
||||
if compose_v2_available; then
|
||||
set_wait_detail "使用 Docker Compose v2 构建 AI Provider 镜像"
|
||||
if run_command_with_spinner "构建 AI Provider 镜像" sh -c "docker compose build aiprovider > \"$AI_PROVIDER_BUILD_LOG_FILE\" 2>&1"; then
|
||||
return 0
|
||||
fi
|
||||
log_warn "Docker Compose v2 构建失败,回退到 docker-compose v1"
|
||||
fi
|
||||
|
||||
if compose_v1_available; then
|
||||
set_wait_detail "使用 docker-compose v1 构建 AI Provider 镜像"
|
||||
if run_command_with_spinner "构建 AI Provider 镜像" sh -c "docker-compose build aiprovider > \"$AI_PROVIDER_BUILD_LOG_FILE\" 2>&1"; then
|
||||
return 0
|
||||
fi
|
||||
return 1
|
||||
fi
|
||||
|
||||
report_missing_compose
|
||||
}
|
||||
|
||||
install_uv_if_needed() {
|
||||
if command -v uv >/dev/null 2>&1; then
|
||||
return 0
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "planet"
|
||||
version = "0.24.3"
|
||||
version = "0.24.4"
|
||||
description = "智能星球计划 - 态势感知系统"
|
||||
requires-python = ">=3.14"
|
||||
dependencies = [
|
||||
|
||||
Reference in New Issue
Block a user