Skip to content

Commit 46b1e6e

Browse files
committed
Remove dependency pull resolution and UI
1 parent 290f70b commit 46b1e6e

6 files changed

Lines changed: 4 additions & 85 deletions

File tree

workspaces/ballerina/ballerina-core/src/interfaces/extended-lang-client.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2029,22 +2029,15 @@ export interface ProjectArtifactsRequest {
20292029
export interface ProjectArtifacts {
20302030
artifacts: Artifacts;
20312031
}
2032+
20322033
export interface CodeMapRequest {
20332034
projectPath: string;
20342035
}
2036+
20352037
export interface CodeMapResponse {
20362038
content?: string;
20372039
}
20382040

2039-
export interface CodeMapResolveModuleDependenciesRequest {
2040-
projectPath: string;
2041-
}
2042-
export interface CodeMapResolveModuleDependenciesResponse {
2043-
success: boolean;
2044-
errorMsg?: string;
2045-
errorDetails?: string;
2046-
}
2047-
20482041
export interface ProjectInfoRequest {
20492042
projectPath: string;
20502043
}
@@ -2158,7 +2151,6 @@ export interface ExtendedLangClientInterface extends BIInterface {
21582151
getDidOpenParams(): DidOpenParams;
21592152
getProjectArtifacts(params: ProjectArtifactsRequest): Promise<ProjectArtifacts>;
21602153
getCodeMap(params: CodeMapRequest): Promise<CodeMapResponse>;
2161-
codeMapResolveModuleDependencies(params: CodeMapResolveModuleDependenciesRequest): Promise<CodeMapResolveModuleDependenciesResponse>;
21622154
getProjectInfo(params: ProjectInfoRequest): Promise<ProjectInfo>;
21632155
getSimpleTypeOfExpression(params: GetSimpleTypeOfExpressionRequest): Promise<GetSimpleTypeOfExpressionResponse>;
21642156
openConfigToml(params: OpenConfigTomlRequest): Promise<void>;

workspaces/ballerina/ballerina-extension/src/core/extended-language-client.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,6 @@ import {
295295
GetSimpleTypeOfExpressionRequest,
296296
AIGetPackageVersionRequest,
297297
AIGetPackageVersionResponse,
298-
CodeMapResolveModuleDependenciesRequest,
299-
CodeMapResolveModuleDependenciesResponse
300298
} from "@wso2/ballerina-core";
301299
import { BallerinaExtension } from "./index";
302300
import { debug, handlePullModuleProgress } from "../utils";
@@ -496,7 +494,6 @@ enum EXTENDED_APIS {
496494
COPILOT_FILTER_LIBRARIES = 'copilotLibraryManager/getFilteredLibraries',
497495
COPILOT_SEARCH_LIBRARIES = 'copilotLibraryManager/getLibrariesBySearch',
498496
COPILOT_GET_CODE_MAP = 'designModelService/codeMap',
499-
COPILOT_CODE_MAP_RESOLVE_MODULE_DEPENDENCIES = 'designModelService/codeMapResolveModuleDependencies',
500497
GET_MIGRATION_TOOLS = 'projectService/getMigrationTools',
501498
TIBCO_TO_BI = 'projectService/importTibco',
502499
MULE_TO_BI = 'projectService/importMule',
@@ -1512,10 +1509,6 @@ export class ExtendedLangClient extends LanguageClient implements ExtendedLangCl
15121509
return this.sendRequest<CodeMapResponse>(EXTENDED_APIS.COPILOT_GET_CODE_MAP, params);
15131510
}
15141511

1515-
async codeMapResolveModuleDependencies(params: CodeMapResolveModuleDependenciesRequest): Promise<CodeMapResolveModuleDependenciesResponse> {
1516-
return this.sendRequest<CodeMapResolveModuleDependenciesResponse>(EXTENDED_APIS.COPILOT_CODE_MAP_RESOLVE_MODULE_DEPENDENCIES, params);
1517-
}
1518-
15191512
// <------------ BI APIS END --------------->
15201513

15211514

workspaces/ballerina/ballerina-extension/src/features/ai/agent/index.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import { StateMachine } from "../../../stateMachine";
1919
import { chatStateStorage } from '../../../views/ai-panel/chatStateStorage';
2020
import { AICommandConfig } from "../executors/base/AICommandExecutor";
2121
import { createWebviewEventHandler } from "../utils/events";
22-
import { sendDependencyPullProgressToAIPanel, clearDependencyPullProgressInAIPanel } from "../utils/ai-utils";
2322
import { AgentExecutor } from './AgentExecutor';
2423
import {
2524
sendTelemetryEvent,
@@ -130,18 +129,6 @@ export async function generateAgent(params: GenerateAgentCodeRequest): Promise<b
130129
const workspacePath = StateMachine.context().workspacePath || projectRootPath;
131130
if (langClient) {
132131
try {
133-
try {
134-
sendDependencyPullProgressToAIPanel('Pulling module dependencies...');
135-
const pullResponse = await langClient.codeMapResolveModuleDependencies({
136-
projectPath: workspacePath
137-
});
138-
console.debug('[generateAgent] resolveModuleDependencies response:', JSON.stringify(pullResponse, null, 2));
139-
} catch (pullErr) {
140-
console.warn('[generateAgent] Failed to resolve module dependencies, continuing:', pullErr);
141-
} finally {
142-
clearDependencyPullProgressInAIPanel();
143-
}
144-
145132
const codeMapResponse = await langClient.getCodeMap({
146133
projectPath: workspacePath,
147134
});

workspaces/ballerina/ballerina-extension/src/features/ai/utils/ai-utils.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import {
2020
ChatNotify,
2121
ChatStart,
2222
DiagnosticEntry,
23-
dependencyPullProgress,
2423
IntermidaryState,
2524
onChatNotify,
2625
ProjectSource,
@@ -44,7 +43,6 @@ import { AiPanelWebview } from "../../../views/ai-panel/webview";
4443
import { MigrationPanelWebview } from "../../../views/migration-panel/webview";
4544
import { VisualizerWebview } from "../../../views/visualizer/webview";
4645
import { GenerationType } from "./libs/libraries";
47-
import { send } from "xstate";
4846
// import { REQUIREMENTS_DOCUMENT_KEY } from "./code/np_prompts";
4947

5048
export function populateHistory(chatHistory: ChatEntry[]): ModelMessage[] {
@@ -236,18 +234,6 @@ export function sendIntermidateStateNotification(intermediaryState: Documentatio
236234
sendAIPanelNotification(msg);
237235
}
238236

239-
export function sendDependencyPullProgressToAIPanel(message: string): void {
240-
RPCLayer._messenger.sendNotification(
241-
dependencyPullProgress,
242-
{ type: "webview", webviewType: AiPanelWebview.viewType },
243-
message
244-
);
245-
}
246-
247-
export function clearDependencyPullProgressInAIPanel(): void {
248-
sendDependencyPullProgressToAIPanel("");
249-
}
250-
251237
export function sendToolCallNotification(toolName: string, toolInput?: any, toolCallId?: string): void {
252238
const msg: ToolCall = {
253239
type: "tool_call",

workspaces/ballerina/ballerina-visualizer/src/views/AIPanel/components/AIChat/index.tsx

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ import { ConfigurationCollectorSegment, ConfigurationCollectionData } from "../C
5555
import CheckpointSeparator from "../CheckpointSeparator";
5656
import { Attachment, AttachmentStatus, TaskApprovalRequest } from "@wso2/ballerina-core";
5757

58-
import { AIChatView, Header, HeaderButtons, ChatMessage, TurnGroup, AuthProviderChip, UsageBadge, ApprovalOverlay, OverlayMessage, OverlayCloseButton, StatusBanner, StatusBannerSpinner } from "../../styles";
58+
import { AIChatView, Header, HeaderButtons, ChatMessage, TurnGroup, AuthProviderChip, UsageBadge, ApprovalOverlay, OverlayMessage, OverlayCloseButton } from "../../styles";
5959
import ReferenceDropdown from "../ReferenceDropdown";
6060
import { VSCodeButton } from "@vscode/webview-ui-toolkit/react";
6161
import MarkdownRenderer from "../MarkdownRenderer";
@@ -241,7 +241,6 @@ const AIChat: React.FC = () => {
241241
const [showContextUsage, setShowContextUsage] = useState(false);
242242

243243
const [runningServices, setRunningServices] = useState<RunningServiceInfo[]>([]);
244-
const [depPullStatus, setDepPullStatus] = useState<string>('');
245244

246245
//TODO: Need a better way of storing data related to last generation to be in the repair state.
247246
const currentDiagnosticsRef = useRef<DiagnosticEntry[]>([]);
@@ -462,12 +461,6 @@ const AIChat: React.FC = () => {
462461
});
463462
}, [rpcClient]);
464463

465-
useEffect(() => {
466-
rpcClient?.onDependencyPullProgress((message: string) => {
467-
setDepPullStatus(message);
468-
});
469-
}, [rpcClient]);
470-
471464
// Initial fetch covers services started before the webview opened;
472465
// the subscription keeps the list live for the rest of the session.
473466
useEffect(() => {
@@ -1803,12 +1796,6 @@ const AIChat: React.FC = () => {
18031796
</Button>
18041797
</HeaderButtons>
18051798
</Header>
1806-
{depPullStatus && (
1807-
<StatusBanner>
1808-
<StatusBannerSpinner />
1809-
<span>{depPullStatus}</span>
1810-
</StatusBanner>
1811-
)}
18121799
<main style={{ flex: 1, overflowY: "auto" }}>
18131800
{migrationSession && (
18141801
<MigrationContextCard

workspaces/ballerina/ballerina-visualizer/src/views/AIPanel/styles.tsx

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* KIND, either express or implied. See the License for the
1515
* specific language governing permissions and limitations
1616
* under the License.
17-
*
17+
*
1818
* THIS FILE INCLUDES AUTO GENERATED CODE
1919
*/
2020

@@ -119,32 +119,6 @@ export const OverlayMessage = styled.div`
119119
gap: 12px;
120120
`;
121121

122-
export const StatusBanner = styled.div`
123-
display: flex;
124-
align-items: center;
125-
gap: 8px;
126-
padding: 6px 12px;
127-
background: var(--vscode-editorWidget-background, var(--vscode-editor-background));
128-
border-bottom: 1px solid var(--vscode-panel-border);
129-
color: var(--vscode-foreground);
130-
font-size: 12px;
131-
font-family: var(--vscode-font-family);
132-
flex-shrink: 0;
133-
`;
134-
135-
export const StatusBannerSpinner = styled.span`
136-
width: 12px;
137-
height: 12px;
138-
border: 2px solid var(--vscode-progressBar-background, var(--vscode-foreground));
139-
border-top-color: transparent;
140-
border-radius: 50%;
141-
animation: status-banner-spin 0.9s linear infinite;
142-
flex-shrink: 0;
143-
@keyframes status-banner-spin {
144-
to { transform: rotate(360deg); }
145-
}
146-
`;
147-
148122
export const OverlayCloseButton = styled.button`
149123
background: transparent;
150124
border: none;

0 commit comments

Comments
 (0)