Skip to content

Commit 04c4982

Browse files
committed
fix: agent chat scenario
1 parent 28c4ce0 commit 04c4982

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

features/agentTool.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Feature: Agent Tools - Ask-question variants and turn action bar
5555
And I click on a "Programming checkbox" element with selector "[data-testid='ask-question-option-1']"
5656
Then I should see a "submit button" element with selector "[data-testid='ask-question-multiselect-submit']"
5757
When I click on a "submit button" element with selector "[data-testid='ask-question-multiselect-submit']"
58-
Then I should see an "agent response" element with selector "[data-testid='message-bubble']:has-text('AI')"
58+
Then I should see an "agent response after multi-select" element with selector "[data-testid='message-bubble']:has-text('两个标签')"
5959
# ── Part 3: text freeform ──
6060
When I click on a "message input textarea" element with selector "[data-testid='agent-message-input']"
6161
And I type "创建一个自定义标题的笔记" in "chat input" element with selector "[data-testid='agent-message-input']"
@@ -67,7 +67,7 @@ Feature: Agent Tools - Ask-question variants and turn action bar
6767
| submit button | [data-testid='ask-question-submit'] |
6868
When I type "My Custom Title" in "freeform input" element with selector "[data-testid='ask-question-text-input'] textarea:not([readonly])"
6969
And I click on a "submit button" element with selector "[data-testid='ask-question-submit']"
70-
Then I should see an "agent response" element with selector "[data-testid='message-bubble']:has-text('My Custom Title')"
70+
Then I should see an "agent response after text input" element with selector "[data-testid='message-bubble']:has-text('标题为')"
7171

7272
@agentTool @mockOpenAI
7373
Scenario: Turn action bar — delete, retry, and rollback-hidden in one session

src/pages/Main/WorkspaceIconAndSelector/SortableWorkspaceSelectorList.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,9 @@ export function SortableWorkspaceSelectorList({ workspacesList, showSideBarText,
836836
let intent: TDragIntent;
837837

838838
const liveRect = _getLiveSortableRect(resolvedOverId, overRect);
839-
const intentRect = liveRect ?? overRect;
839+
// Keep dnd-kit's coordinate frame for pointer-vs-top math, but refresh
840+
// height from the DOM so stale cached heights do not skew zone boundaries.
841+
const intentRect = { top: overRect.top, height: liveRect?.height ?? overRect.height };
840842
const reorderIntent = getReorderIntentFromPointer({
841843
pointerY: referenceY,
842844
rect: intentRect,

src/services/workspacesView/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import type { IPreferenceService } from '@services/preferences/interface';
1515
import serviceIdentifier from '@services/serviceIdentifier';
1616
import { SupportedStorageServices } from '@services/types';
1717
import type { IViewService } from '@services/view/interface';
18+
import { SubWikiSMainWikiNotExistError } from '@services/wiki/error';
1819
import type { IWikiService } from '@services/wiki/interface';
1920
import type { IWindowService } from '@services/windows/interface';
2021
import { WindowNames } from '@services/windows/WindowProperties';
@@ -119,7 +120,7 @@ export class WorkspaceView implements IWorkspaceViewService {
119120
if (isNew && typeof workspace.mainWikiID === 'string' && !wikiService.checkWikiStartLock(workspace.mainWikiID)) {
120121
const mainWorkspace = await workspaceService.get(workspace.mainWikiID);
121122
if (mainWorkspace === undefined || !isWikiWorkspace(mainWorkspace) || mainWorkspace.isSubWiki) {
122-
throw new Error(`Main wiki ${workspace.mainWikiID} for sub-wiki ${workspace.name ?? workspace.id} does not exist`);
123+
throw new SubWikiSMainWikiNotExistError(workspace.name ?? workspace.id, workspace.mainWikiID);
123124
}
124125
await this.restartWorkspaceViewService(workspace.mainWikiID);
125126
logger.debug('[test-id-MAIN_WIKI_RESTARTED_AFTER_SUBWIKI] Main wiki restarted after sub-wiki creation', { mainWikiID: workspace.mainWikiID, subWikiID: workspace.id });

0 commit comments

Comments
 (0)