Skip to content

Commit f91c4a6

Browse files
committed
chore: upgrade SDK to v0.16.3 and rename wave-admin to Wave AI
- Upgrade wave-agent-sdk from ^0.16.2 to ^0.16.3 - Rename adminUrl to aiUrl across backend and frontend - Update WAVE_ADMIN_URL env var to WAVE_AI_URL - Update UI label from 'Admin URL' to 'AI URL' - Update spec documentation to reflect Wave AI rebrand
1 parent c5f944c commit f91c4a6

7 files changed

Lines changed: 25 additions & 25 deletions

File tree

docs/spec.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -594,9 +594,9 @@ Wave 在后台自动维护项目记忆,帮助 AI 持续了解项目演变:
594594

595595
**主要特性:**
596596

597-
- **Admin URL**:配置 wave-admin 实例地址,用于 SSO 认证。支持环境变量 `WAVE_ADMIN_URL` 作为 fallback。
598-
- **SSO 登录/登出**:当配置了 Admin URL 后,用户可通过 SSO 认证进行登录,无需手动配置 API Key。登录后所有 API 请求自动通过 wave-admin 代理路由。
599-
- **浏览器登录**:点击"SSO 登录"后自动打开浏览器,用户在 wave-admin 登录页完成认证(支持 SSO 企业身份提供商或账号密码登录),授权码通过 localhost 回调自动交换为 JWT 并保存。VS Code Remote SSH 环境会自动转发端口,远程服务器体验与本地一致。
597+
- **AI URL**:配置 Wave AI 实例地址,用于 SSO 认证。支持环境变量 `WAVE_AI_URL` 作为 fallback。
598+
- **SSO 登录/登出**:当配置了 AI URL 后,用户可通过 SSO 认证进行登录,无需手动配置 API Key。登录后所有 API 请求自动通过 Wave AI 代理路由。
599+
- **浏览器登录**:点击"SSO 登录"后自动打开浏览器,用户在 Wave AI 登录页完成认证(支持 SSO 企业身份提供商或账号密码登录),授权码通过 localhost 回调自动交换为 JWT 并保存。VS Code Remote SSH 环境会自动转发端口,远程服务器体验与本地一致。
600600
- **登录状态显示**:已认证时显示用户邮箱/ID 和登出按钮;登出后自动恢复为直接 LLM API 模式。
601601

602602
![配置设置](/screenshots/spec-configuration.png)

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,6 @@
127127
"dompurify": "^3.3.0",
128128
"marked": "^9.1.6",
129129
"mermaid": "^11.12.2",
130-
"wave-agent-sdk": "^0.16.2"
130+
"wave-agent-sdk": "^0.16.3"
131131
}
132132
}

src/services/configurationService.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import * as vscode from 'vscode';
22

33
export interface ConfigurationData {
4-
adminUrl?: string;
4+
aiUrl?: string;
55
apiKey?: string;
66
headers?: string;
77
baseURL?: string;
88
model?: string;
99
fastModel?: string;
1010
language?: string;
1111
/** Environment variable values (read-only, for placeholder display) */
12-
envAdminUrl?: string;
12+
envAiUrl?: string;
1313
envApiKey?: string;
1414
envHeaders?: string;
1515
envBaseUrl?: string;
@@ -22,14 +22,14 @@ export class ConfigurationService {
2222

2323
public async loadConfiguration(): Promise<ConfigurationData> {
2424
return {
25-
adminUrl: this.context.globalState.get<string>('adminUrl') || '',
25+
aiUrl: this.context.globalState.get<string>('aiUrl') || '',
2626
apiKey: this.context.globalState.get<string>('apiKey') || '',
2727
headers: this.context.globalState.get<string>('headers') || '',
2828
baseURL: this.context.globalState.get<string>('baseURL') || '',
2929
model: this.context.globalState.get<string>('model') || '',
3030
fastModel: this.context.globalState.get<string>('fastModel') || '',
3131
language: this.context.globalState.get<string>('language') || 'Chinese',
32-
envAdminUrl: process.env.WAVE_ADMIN_URL || undefined,
32+
envAiUrl: process.env.WAVE_AI_URL || undefined,
3333
envApiKey: process.env.WAVE_API_KEY || undefined,
3434
envHeaders: process.env.WAVE_CUSTOM_HEADERS || undefined,
3535
envBaseUrl: process.env.WAVE_BASE_URL || undefined,

src/session/chatSession.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ export class ChatSession {
6363

6464
const isAuthValid = (!!config.apiKey || !!process.env.WAVE_API_KEY)
6565
|| (!!config.headers || !!process.env.WAVE_CUSTOM_HEADERS)
66-
|| (!!config.adminUrl || !!process.env.WAVE_ADMIN_URL);
67-
const isBaseURLValid = !!config.baseURL || !!process.env.WAVE_BASE_URL || !!config.adminUrl || !!process.env.WAVE_ADMIN_URL;
66+
|| (!!config.aiUrl || !!process.env.WAVE_AI_URL);
67+
const isBaseURLValid = !!config.baseURL || !!process.env.WAVE_BASE_URL || !!config.aiUrl || !!process.env.WAVE_AI_URL;
6868

6969
const agentCallbacks: AgentCallbacks = {
7070
onMessagesChange: (messages: Message[]) => {
@@ -109,7 +109,7 @@ export class ChatSession {
109109
apiKey: config.apiKey || undefined,
110110
defaultHeaders: this.parseHeaders(config.headers),
111111
baseURL: config.baseURL || undefined,
112-
adminUrl: config.adminUrl || undefined,
112+
aiUrl: config.aiUrl || undefined,
113113
model: config.model,
114114
fastModel: config.fastModel,
115115
language: config.language,

webview/src/components/ConfigurationDialog.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const ConfigurationDialog: React.FC<ConfigurationDialogProps & { vscode: any }>
2323
const [activePluginTab, setActivePluginTab] = useState<'explore' | 'installed' | 'marketplaces'>('explore');
2424

2525
const [formData, setFormData] = useState<ConfigurationData>({
26-
adminUrl: '',
26+
aiUrl: '',
2727
apiKey: '',
2828
headers: '',
2929
baseURL: '',
@@ -225,13 +225,13 @@ const ConfigurationDialog: React.FC<ConfigurationDialogProps & { vscode: any }>
225225
<form onSubmit={handleSubmit} className="configuration-form">
226226
<div className="configuration-fields-scroll-area">
227227
<div className="configuration-field">
228-
<label htmlFor="adminUrl">Admin URL:</label>
228+
<label htmlFor="aiUrl">AI URL:</label>
229229
<input
230-
id="adminUrl"
230+
id="aiUrl"
231231
type="url"
232-
value={formData.adminUrl || ''}
233-
onChange={(e) => handleInputChange('adminUrl', e.target.value)}
234-
placeholder={configurationData?.envAdminUrl || 'https://wave-admin.example.com (或设置 WAVE_ADMIN_URL)'}
232+
value={formData.aiUrl || ''}
233+
onChange={(e) => handleInputChange('aiUrl', e.target.value)}
234+
placeholder={configurationData?.envAiUrl || 'https://wave-ai.example.com (或设置 WAVE_AI_URL)'}
235235
disabled={isLoading}
236236
/>
237237
</div>
@@ -259,7 +259,7 @@ const ConfigurationDialog: React.FC<ConfigurationDialogProps & { vscode: any }>
259259
type="button"
260260
className="sso-login-btn"
261261
onClick={handleLogin}
262-
disabled={authLoading || (!formData.adminUrl && !configurationData?.envAdminUrl)}
262+
disabled={authLoading || (!formData.aiUrl && !configurationData?.envAiUrl)}
263263
>
264264
{authLoading ? '登录中...' : 'SSO 登录'}
265265
</button>

webview/src/types/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,8 @@ export interface ConfirmationDialogProps {
287287
* Maps to VS Code global state
288288
*/
289289
export interface ConfigurationData {
290-
/** Wave admin URL for SSO authentication (user-configured value) */
291-
adminUrl?: string;
290+
/** Wave AI URL for SSO authentication (user-configured value) */
291+
aiUrl?: string;
292292
/** API key for authentication */
293293
apiKey?: string;
294294
/** Headers for authentication */
@@ -302,7 +302,7 @@ export interface ConfigurationData {
302302
/** Preferred language for agent communication */
303303
language?: string;
304304
/** Environment variable values (read-only, for placeholder display) */
305-
envAdminUrl?: string;
305+
envAiUrl?: string;
306306
envApiKey?: string;
307307
envHeaders?: string;
308308
envBaseUrl?: string;

0 commit comments

Comments
 (0)