Skip to content

Commit 0921b05

Browse files
rainerWJYansweropensourceheimanbaqwencoder
authored
V4.10.9 (#232)
* Update UI build files - 2025-09-25 17:47:49 * Enhance error logging in build script and update component interfaces for improved clarity and functionality. Added new properties to AssignedTools and SidebarStore, ensuring consistent tool data structure. Updated InputArea.vue to include additional file upload methods. * 1 * Merge remote-tracking branch 'upstream/main' * Remove unused codicon font file to streamline asset management. * upd * pom * Update codicon font file to latest version for improved UI consistency. * Remove deprecated AgentController and AgentManagementController; update API service references in UI components to ToolApiService for improved functionality and consistency. Clean up unused agent configuration files and update localization strings for better user experience. * Refactor agent classes to remove PromptService dependency and replace with PromptTemplate for message creation. Clean up imports and remove unused classes related to prompt management. Delete obsolete prompt-related files and update localization strings in the UI for improved user experience. * springstyle * configuration * build ui * Remove force override configuration from ManusProperties and related localization strings to streamline agent settings. Update user input processing prompt for clarity. * build ui * upd style * fix output * build ui * build ui * Refactor dependency injection by removing @Autowired annotations from multiple service classes. Clean up imports and comment out unused variables in PlanningFactory and DynamicAgentPlanCreator for improved code clarity and maintainability. * Enhance DynamicAgent and related classes with ObjectMapper integration for improved JSON handling. Introduce processToolResult method to handle escaped JSON strings and add structureResult field to PlanExecutionRecord for better data representation. Update ManusController to extract last tool call results and ensure proper serialization. Clean up imports and refactor dependency injection in various components for improved maintainability. * version * ignore this file * ignore * feat: add code inspector plugin and integrate Ant Design icons in con… (#148) * feat: add code inspector plugin and integrate Ant Design icons in configuration Change-Id: I825ba635e1899ff9c9db8935801f3e7a45ce2be6 * refactor: update comments to English for better clarity and consistency Change-Id: Iee3a693a30a65f2bfeaa6d9f5a342ce675df7950 * chore: update pnpm-lock.yaml for dependency management Change-Id: Ic29f61aeaaaedfbe3d30d57284c5681467a87795 Co-developed-by: Cursor <noreply@cursor.com> * chore: bump version to 4.10.9 Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * refactor: optimize ActToolInfoEntity conversion in NewRepoPlanExecutionRecorder - Replaced stream-based conversion with a for-loop for better performance and clarity when converting ActToolParam to ActToolInfoEntity. - This change enhances readability and maintains the functionality of setting the actToolInfoList in the thinkActRecord. * fix * feat: add "viewTaskFiles" functionality to File Browser - Introduced a new button in the ResponseSection component to open the file browser for task files. - Updated localization files for English and Chinese to include the new "viewTaskFiles" string. - Enhanced the RightPanel component with styles for the new button, improving user interface consistency. * fix: correct message addition order in DynamicAgent - Adjusted the order of message additions in the DynamicAgent class to ensure the system message is added after the history memory, improving the clarity of message handling during agent interactions. - This change enhances the logging output for better debugging and tracking of message history. * fix: clarify comment in templateStore reset logic - Updated comment in templateStore to remove unnecessary reference to "old value," enhancing clarity regarding the reset process of the plan template configuration. This change aims to improve code readability and maintainability. * fix: remove unnecessary blank line in DynamicAgent class - Eliminated an extra blank line in the DynamicAgent class to enhance code readability and maintainability. This minor adjustment contributes to cleaner code formatting. --------- Co-authored-by: rainerWJY <answeropensource@alibabacloud.com> Co-authored-by: mamba <371510756@qq.com> Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
1 parent 14f4d6e commit 0921b05

11 files changed

Lines changed: 141 additions & 47 deletions

File tree

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.10.8
1+
4.10.9

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<groupId>com.lynxe</groupId>
88
<name>Lynxe - AI Agent Management System</name>
99
<artifactId>lynxe</artifactId>
10-
<version>4.10.8</version>
10+
<version>4.10.9</version>
1111

1212
<parent>
1313
<groupId>org.springframework.boot</groupId>

src/main/java/com/alibaba/cloud/ai/lynxe/agent/DynamicAgent.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,9 +338,10 @@ private boolean executeWithRetry(int maxRetries) throws Exception {
338338
// first round, and may be compressed)
339339
List<Message> historyMem = agentMessages;
340340

341-
messages.addAll(Collections.singletonList(systemMessage));
342341
// Add historyMem (agent memory) in every round
343342
messages.addAll(historyMem);
343+
messages.addAll(Collections.singletonList(systemMessage));
344+
344345
log.debug("Added {} history messages from agent memory for round {}", historyMem.size(),
345346
getCurrentStep());
346347

src/main/java/com/alibaba/cloud/ai/lynxe/recorder/service/NewRepoPlanExecutionRecorder.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -421,10 +421,10 @@ public Long recordThinkingAndAction(ExecutionStep step, ThinkActRecordParams par
421421

422422
// Convert ActToolParam to ActToolInfoEntity and set the list
423423
if (params.getActToolInfoList() != null && !params.getActToolInfoList().isEmpty()) {
424-
List<ActToolInfoEntity> actToolInfoEntities = params.getActToolInfoList()
425-
.stream()
426-
.map(this::convertToActToolInfoEntity)
427-
.collect(java.util.stream.Collectors.toList());
424+
List<ActToolInfoEntity> actToolInfoEntities = new ArrayList<>(params.getActToolInfoList().size());
425+
for (ActToolParam p : params.getActToolInfoList()) {
426+
actToolInfoEntities.add(convertToActToolInfoEntity(p));
427+
}
428428
thinkActRecord.setActToolInfoList(actToolInfoEntities);
429429
}
430430

ui-vue3/src/base/i18n/en.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ const words: I18nType = {
9999
// File Browser
100100
fileBrowser: {
101101
title: 'File Browser',
102+
viewTaskFiles: 'Task files',
102103
refresh: 'Refresh',
103104
loading: 'Loading file tree...',
104105
retry: 'Retry',

ui-vue3/src/base/i18n/zh.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ const words: I18nType = {
9797
// 文件浏览器
9898
fileBrowser: {
9999
title: '文件浏览器',
100+
viewTaskFiles: '任务文件',
100101
refresh: '刷新',
101102
loading: '正在加载文件树...',
102103
retry: '重试',

ui-vue3/src/components/chat/ResponseSection.vue

Lines changed: 53 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@
5353
>
5454
<Icon icon="carbon:copy" />
5555
</button>
56+
<button
57+
class="action-btn task-files-btn"
58+
@click="openFileBrowser"
59+
:title="$t('fileBrowser.viewTaskFiles')"
60+
>
61+
<Icon icon="carbon:folder" />
62+
<span>{{ $t('fileBrowser.viewTaskFiles') }}</span>
63+
</button>
5664
</div>
5765
</div>
5866
</template>
@@ -70,6 +78,14 @@
7078
>
7179
<Icon icon="carbon:copy" />
7280
</button>
81+
<button
82+
class="action-btn task-files-btn"
83+
@click="openFileBrowser"
84+
:title="$t('fileBrowser.viewTaskFiles')"
85+
>
86+
<Icon icon="carbon:folder" />
87+
<span>{{ $t('fileBrowser.viewTaskFiles') }}</span>
88+
</button>
7389
</div>
7490
</div>
7591

@@ -104,6 +120,7 @@
104120

105121
<script setup lang="ts">
106122
import type { UserInputWaitState } from '@/types/plan-execution-record'
123+
import { useRightPanelSingleton } from '@/composables/useRightPanel'
107124
import { logger } from '@/utils/logger'
108125
import { Icon } from '@iconify/vue'
109126
import UserInputForm from './UserInputForm.vue'
@@ -133,8 +150,13 @@ const props = defineProps<Props>()
133150
const emit = defineEmits<Emits>()
134151
135152
const { formatResponseText, formatTimestamp } = useMessageFormatting()
153+
const rightPanel = useRightPanelSingleton()
136154
137155
// Methods
156+
const openFileBrowser = () => {
157+
rightPanel.openFileBrowserForPlan(props.planId ?? null)
158+
}
159+
138160
const copyToClipboard = async () => {
139161
if (!props.content) return
140162
@@ -416,8 +438,6 @@ const handleUserInputSubmitted = (inputData: Record<string, unknown>) => {
416438
display: flex;
417439
gap: 8px;
418440
margin-top: 8px;
419-
opacity: 0;
420-
transition: opacity 0.2s ease;
421441
422442
.action-btn {
423443
display: flex;
@@ -440,11 +460,24 @@ const handleUserInputSubmitted = (inputData: Record<string, unknown>) => {
440460
svg {
441461
font-size: 14px;
442462
}
443-
}
444-
}
445463
446-
&:hover .response-actions {
447-
opacity: 1;
464+
&.task-files-btn {
465+
width: auto;
466+
height: 28px;
467+
padding: 0 10px;
468+
gap: 6px;
469+
470+
span {
471+
font-size: 12px;
472+
white-space: nowrap;
473+
}
474+
475+
svg {
476+
font-size: 14px;
477+
flex-shrink: 0;
478+
}
479+
}
480+
}
448481
}
449482
}
450483
@@ -584,6 +617,20 @@ const handleUserInputSubmitted = (inputData: Record<string, unknown>) => {
584617
svg {
585618
font-size: 12px;
586619
}
620+
621+
&.task-files-btn {
622+
width: auto;
623+
height: 26px;
624+
padding: 0 8px;
625+
626+
span {
627+
font-size: 11px;
628+
}
629+
630+
svg {
631+
font-size: 12px;
632+
}
633+
}
587634
}
588635
}
589636
}

ui-vue3/src/components/right-panel/RightPanel.vue

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
</div>
7373
<div v-else class="no-template-selected">
7474
<div class="action-buttons">
75-
<button class="new-task-btn" @click="handleCreateNewPlan">
75+
<button class="new-task-btn" :disabled="isCreatingNew" @click="handleCreateNewPlan">
7676
<Icon icon="carbon:add" width="16" />
7777
{{ t('rightPanel.newFuncAgentPlan') }}
7878
</button>
@@ -505,28 +505,23 @@ const stepStatusText = computed(() => {
505505
/**
506506
* Handle creating a new Func-Agent plan
507507
*/
508+
const isCreatingNew = ref(false)
509+
508510
const handleCreateNewPlan = async () => {
511+
if (isCreatingNew.value) return
512+
isCreatingNew.value = true
509513
try {
510514
const planType = planTemplateConfigStore.getPlanType() || 'dynamic_agent'
511515
await templateStore.createNewTemplate(planType)
512516
513-
const newTemplate = selectedTemplate.value
514-
if (newTemplate) {
515-
planTemplateConfigStore.reset()
516-
planTemplateConfigStore.setPlanType(newTemplate.planType || 'dynamic_agent')
517-
if (newTemplate.planTemplateId) {
518-
planTemplateConfigStore.setPlanTemplateId(newTemplate.planTemplateId)
519-
}
520-
planTemplateConfigStore.setTitle(newTemplate.title || '')
521-
}
522-
523-
// Reload available tools to ensure fresh tool list
524517
logger.debug('[RightPanel] 🔄 Reloading available tools for new template')
525518
await availableToolsStore.loadAvailableTools()
526519
} catch (error) {
527520
logger.error('[RightPanel] Failed to create new plan:', error)
528521
const message = error instanceof Error ? error.message : t('rightPanel.createPlanFailed')
529522
toast.error(message)
523+
} finally {
524+
isCreatingNew.value = false
530525
}
531526
}
532527
@@ -1190,6 +1185,35 @@ defineExpose({
11901185
}
11911186
}
11921187
1188+
.open-files-btn {
1189+
display: flex;
1190+
align-items: center;
1191+
gap: 4px;
1192+
background: rgba(0, 0, 0, 0.3);
1193+
border: 1px solid rgba(255, 255, 255, 0.1);
1194+
border-radius: 4px;
1195+
padding: 4px 8px;
1196+
color: rgba(255, 255, 255, 0.7);
1197+
cursor: pointer;
1198+
transition: all 0.2s;
1199+
font-size: 12px;
1200+
1201+
&:hover {
1202+
background: rgba(0, 0, 0, 0.5);
1203+
border-color: rgba(255, 255, 255, 0.2);
1204+
color: rgba(255, 255, 255, 0.9);
1205+
}
1206+
1207+
&:active {
1208+
transform: scale(0.95);
1209+
}
1210+
1211+
.iconify {
1212+
font-size: 14px;
1213+
flex-shrink: 0;
1214+
}
1215+
}
1216+
11931217
.value {
11941218
color: #cccccc;
11951219
font-size: 14px;

ui-vue3/src/components/sidebar/Sidebar.vue

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<div class="sidebar-content">
1919
<div class="sidebar-content-header">
2020
<div class="sidebar-content-title">{{ $t('sidebar.title') }}</div>
21-
<button class="new-task-btn" @click="handleCreateNewTemplate">
21+
<button class="new-task-btn" :disabled="isCreatingNew" @click="handleCreateNewTemplate">
2222
<Icon icon="carbon:add" width="16" />
2323
{{ $t('sidebar.newPlan') }}
2424
</button>
@@ -45,7 +45,7 @@ import { usePlanTemplateConfigStore } from '@/stores/new/planTemplateConfig'
4545
import { templateStore } from '@/stores/new/templateStore'
4646
import { logger } from '@/utils/logger'
4747
import { Icon } from '@iconify/vue'
48-
import { onMounted } from 'vue'
48+
import { onMounted, ref } from 'vue'
4949
import TemplateList from './TemplateList.vue'
5050
5151
// Props
@@ -63,27 +63,26 @@ const planTemplateConfigStore = usePlanTemplateConfigStore()
6363
const rightPanel = useRightPanelSingleton()
6464
const appStore = useAppStore()
6565
66+
// Guard to prevent double-click creating multiple new plans
67+
const isCreatingNew = ref(false)
68+
6669
// Handle create new template
6770
const handleCreateNewTemplate = async () => {
68-
const planType = planTemplateConfigStore.getPlanType() || 'dynamic_agent'
69-
await templateStore.createNewTemplate(planType)
70-
71-
const newTemplate = planTemplateConfigStore.selectedTemplate
72-
if (newTemplate) {
73-
planTemplateConfigStore.reset()
74-
planTemplateConfigStore.setPlanType(newTemplate.planType || 'dynamic_agent')
75-
if (newTemplate.planTemplateId) {
76-
planTemplateConfigStore.setPlanTemplateId(newTemplate.planTemplateId)
77-
}
78-
planTemplateConfigStore.setTitle(newTemplate.title || '')
71+
if (isCreatingNew.value) return
72+
isCreatingNew.value = true
73+
try {
74+
const planType = planTemplateConfigStore.getPlanType() || 'dynamic_agent'
75+
await templateStore.createNewTemplate(planType)
76+
77+
// Switch to 'config' tab to show Func-Agent configuration
78+
rightPanel.setActiveTab('config')
79+
80+
// Reload available tools to ensure fresh tool list
81+
logger.debug('[Sidebar] 🔄 Reloading available tools for new template')
82+
await availableToolsStore.loadAvailableTools()
83+
} finally {
84+
isCreatingNew.value = false
7985
}
80-
81-
// Switch to 'config' tab to show Func-Agent configuration
82-
rightPanel.setActiveTab('config')
83-
84-
// Reload available tools to ensure fresh tool list
85-
logger.debug('[Sidebar] 🔄 Reloading available tools for new template')
86-
await availableToolsStore.loadAvailableTools()
8786
}
8887
8988
// Lifecycle

ui-vue3/src/composables/useRightPanel.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,17 @@ export function useRightPanel() {
278278
logger.debug('[useRightPanel] Active tab set to:', tab)
279279
}
280280

281+
/**
282+
* Open the file browser tab and set which plan's files to show.
283+
* Use this when opening file browser from a response so the correct plan-id is used.
284+
* @param planId - Root plan ID whose files to show; if null, file browser uses currentRootPlanId
285+
*/
286+
const openFileBrowserForPlan = (planId: string | null): void => {
287+
selectedRootPlanId.value = planId
288+
activeTab.value = 'files'
289+
logger.debug('[useRightPanel] Open file browser for plan:', planId)
290+
}
291+
281292
/**
282293
* Update displayed plan progress
283294
* This method is kept for backward compatibility but no longer needed
@@ -369,6 +380,7 @@ export function useRightPanel() {
369380
handleStepSelected,
370381
refreshCurrentStep,
371382
setActiveTab,
383+
openFileBrowserForPlan,
372384
updateDisplayedPlanProgress,
373385
clearSelectedStep,
374386
formatJson,

0 commit comments

Comments
 (0)