feat: add master-agent jump after openai onboarding
This commit is contained in:
@@ -179,9 +179,8 @@ public class OpenAiOnboardingActivity extends BossScreenActivity {
|
||||
BossApiClient.ApiResponse response = apiClient.onboardOpenAiApiAccount(payload);
|
||||
if (!response.ok()) throw new IllegalStateException(response.message());
|
||||
runOnUiThread(() -> {
|
||||
showMessage("OpenAI 平台账号已登录,并设为当前主控。");
|
||||
setResult(RESULT_OK);
|
||||
finish();
|
||||
showPostLoginActions();
|
||||
});
|
||||
} catch (Exception error) {
|
||||
runOnUiThread(() -> {
|
||||
@@ -194,4 +193,26 @@ public class OpenAiOnboardingActivity extends BossScreenActivity {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void showPostLoginActions() {
|
||||
new AlertDialog.Builder(this)
|
||||
.setTitle("OpenAI 平台账号已登录")
|
||||
.setMessage("已经设为当前主控。现在就可以直接测试主 Agent 对话。")
|
||||
.setPositiveButton("测试主 Agent 对话", (dialog, which) -> openMasterAgentConversation())
|
||||
.setNegativeButton("稍后再说", (dialog, which) -> finish())
|
||||
.setOnDismissListener(dialog -> {
|
||||
if (!isFinishing()) {
|
||||
finish();
|
||||
}
|
||||
})
|
||||
.show();
|
||||
}
|
||||
|
||||
private void openMasterAgentConversation() {
|
||||
Intent intent = new Intent(this, ProjectDetailActivity.class);
|
||||
intent.putExtra(ProjectDetailActivity.EXTRA_PROJECT_ID, "master-agent");
|
||||
intent.putExtra(ProjectDetailActivity.EXTRA_PROJECT_NAME, "主 Agent");
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user