Skip to content

Commit

Permalink
Fix prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
fabioz committed Aug 9, 2024
1 parent 5158342 commit 788f344
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 22 deletions.
4 changes: 2 additions & 2 deletions sema4ai/vscode-client/src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ export async function getWorkspacePackages(): Promise<WorkspacePackagesInfo> {
} else {
localRobots = actionResultListLocalRobots.result;
}

let localAgents: any[];
if (!actionResultListAgents.success) {
feedbackRobocorpCodeError("ACT_LIST_AGENTS");
window.showErrorMessage("Error listing agents: " + actionResultListAgents.message);

// This shouldn't happen, but let's proceed as if there were no Agents in the workspace.
localAgents = [];
} else {
Expand Down
3 changes: 1 addition & 2 deletions sema4ai/vscode-client/src/robo/actionPackage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,7 @@ async function askActionPackageTargetDir(ws: WorkspaceFolder): Promise<string |
},
{
"label": "Workspace (root) level",
"detail":
"Action Package will be created at workspace root level",
"detail": "Action Package will be created at workspace root level",
},
],
{
Expand Down
22 changes: 8 additions & 14 deletions sema4ai/vscode-client/src/robo/agentPackage.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
import {
commands,
window
} from "vscode";
import { commands, window } from "vscode";
import { getAgentCliLocation } from "../agentCli";
import { askForWs } from "../ask";
import {
getPackageTargetDirectory,
verifyIfIsPackageDirectory,
refreshFilesExplorer,
verifyIfPathOkToCreatePackage
verifyIfPathOkToCreatePackage,
} from "../common";
import { ActionResult } from "../protocols";
import * as roboCommands from "../robocorpCommands";
import { makeDirs } from "../files";
import {
logError,
OUTPUT_CHANNEL
} from "../channel";
import { logError, OUTPUT_CHANNEL } from "../channel";

export const createAgentPackage = async (): Promise<void> => {
/* We make sure Agent Server exists - if not, getAgentServerLocation will ask user to download it. */
Expand All @@ -33,11 +27,11 @@ export const createAgentPackage = async (): Promise<void> => {
}

const targetDir = await getPackageTargetDirectory(ws, {
title: "Where do you want to create the Agent Package?",
useWorkspaceFolderPrompt: "The workspace will only have a single Agent Package.",
useChildFolderPrompt: "Multiple Agent Packages can be created in this workspace.",
provideNamePrompt: "Please provide the name for the Agent Package folder name."
});
title: "Where do you want to create the Agent Package?",
useWorkspaceFolderPrompt: "The workspace will only have a single Agent Package.",
useChildFolderPrompt: "Multiple Agent Packages can be created in this workspace.",
provideNamePrompt: "Please provide the name for the Agent Package folder name.",
});

/* Operation cancelled. */
if (!targetDir) {
Expand Down
12 changes: 8 additions & 4 deletions sema4ai/vscode-client/src/robo/oauth2InInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,14 @@ export const oauth2Logout = async () => {
return; // user cancelled.
}
progress.report({ message: "Logging out...", increment: 20 });
const logoutResult = await langServer.sendRequest<ActionResult<any>>("oauth2Logout", {
action_server_location: actionServerLocation,
provider: selected,
}, token);
const logoutResult = await langServer.sendRequest<ActionResult<any>>(
"oauth2Logout",
{
action_server_location: actionServerLocation,
provider: selected,
},
token
);
if (!logoutResult.success) {
window.showErrorMessage(`Error in OAuth2 logout. Details: ${logoutResult.message}`);
return;
Expand Down

0 comments on commit 788f344

Please sign in to comment.