Skip to content

Commit

Permalink
Minor fixes (cancelling agent package selectiond and getting a defaul…
Browse files Browse the repository at this point in the history
…t version if version is not specified).
  • Loading branch information
fabioz committed Oct 22, 2024
1 parent 81b71ad commit 25beb43
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 9 additions & 2 deletions sema4ai/src/sema4ai_code/workspace_manager.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import os
from collections import defaultdict
from collections.abc import Iterator
from pathlib import Path
from typing import DefaultDict, Dict, List, Optional, Tuple
from collections.abc import Iterator

from sema4ai_ls_core.cache import CachedFileInfo
from sema4ai_ls_core.core_log import get_logger
Expand Down Expand Up @@ -137,9 +137,16 @@ def _get_agent_package_organizations(
for action_package_metadata in self._get_action_package_from_dir(
org_directory, curr_cache, new_cache
):
v = action_package_metadata["yamlContents"].get("version")
if v is None:
log.info(
f"No version found for action package: {action_package_metadata.get('name')} in dir: {action_package_metadata.get('directory')}"
)
v = "0.0.1"

action_packages[action_package_metadata["name"]].append(
(
str(action_package_metadata["yamlContents"]["version"]),
v,
action_package_metadata,
)
)
Expand Down
4 changes: 4 additions & 0 deletions sema4ai/vscode-client/src/robo/agentPackage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,10 @@ export const refreshAgentSpec = async (agentPath: string): Promise<void> => {

if (!agentPath) {
agentPath = await selectAgentPackage();
if (!agentPath) {
// Operation cancelled.
return;
}
}

try {
Expand Down

0 comments on commit 25beb43

Please sign in to comment.