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
6 changes: 4 additions & 2 deletions data-agent-frontend/src/components/run/ChatSessionSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
<!-- 顶部操作栏 -->
<div class="sidebar-header">
<div class="header-controls">
<!-- <el-button type="primary" @click="goBack" circle>
<el-button type="primary" @click="goBack" circle>
<el-icon><ArrowLeft /></el-icon>
</el-button> -->
</el-button>
<!-- 头像居中 -->
<el-avatar :src="agent.avatar" size="large" style="margin: 0 auto">
{{ agent.name }}
Expand Down Expand Up @@ -135,6 +135,7 @@
Edit,
DArrowLeft,
DArrowRight,
ArrowLeft,
} from '@element-plus/icons-vue';
import { type Agent } from '../../services/agent';
import { type ChatSession } from '../../services/chat';
Expand All @@ -161,6 +162,7 @@
Edit,
DArrowLeft,
DArrowRight,
ArrowLeft,
},
props: {
agent: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.MediaType;
import org.springframework.http.codec.ServerSentEvent;
import org.springframework.http.server.reactive.ServerHttpResponse;
import org.springframework.web.bind.annotation.*;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Sinks;
Expand All @@ -49,11 +48,7 @@ public Flux<ServerSentEvent<GraphNodeResponse>> streamSearch(@RequestParam("agen
@RequestParam(value = "humanFeedback", required = false) boolean humanFeedback,
@RequestParam(value = "humanFeedbackContent", required = false) String humanFeedbackContent,
@RequestParam(value = "rejectedPlan", required = false) boolean rejectedPlan,
@RequestParam(value = "nl2sqlOnly", required = false) boolean nl2sqlOnly, ServerHttpResponse response) {
// Set SSE-related HTTP headers
response.getHeaders().add("Cache-Control", "no-cache");
response.getHeaders().add("Connection", "keep-alive");
response.getHeaders().add("Access-Control-Allow-Origin", "*");
@RequestParam(value = "nl2sqlOnly", required = false) boolean nl2sqlOnly) {

Sinks.Many<ServerSentEvent<GraphNodeResponse>> sink = Sinks.many().unicast().onBackpressureBuffer();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ default String buildConnectionUrl(Datasource datasource) {
}

default String resolveConnectionUrl(Datasource datasource) {
if (hasRequiredConnectionFields(datasource)) {
return buildConnectionUrl(datasource);
}
String existing = datasource.getConnectionUrl();
if (StringUtils.hasText(existing)) {
return existing;
Expand Down
Loading
Loading