mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-15 02:17:26 +00:00
Moved yamls to src/serena so that they're packaged [ci skip]
This commit is contained in:
1 parent
3a9cde185a
commit
a1e3bb19b6
16 files changed
+8
-15
No files matched your search
@@ -74,14 +74,6 @@ Homepage = "https://github.com/oraios/serena"
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["src/serena", "src/multilspy", "src/interprompt"]
|
||||
|
||||
[tool.hatch.build]
|
||||
include = [
|
||||
"config/**",
|
||||
"serena_config.template.yml",
|
||||
"project.template.yml"
|
||||
]
|
||||
|
||||
|
||||
[tool.black]
|
||||
line-length = 140
|
||||
target-version = [
|
||||
|
||||
+2
-3
@@ -36,7 +36,7 @@ from multilspy.multilspy_logger import MultilspyLogger
|
||||
from multilspy.multilspy_types import SymbolKind
|
||||
from serena import serena_root_path, serena_version
|
||||
from serena.config import SerenaAgentContext, SerenaAgentMode
|
||||
from serena.constants import PROJECT_TEMPLATE_FILE, SERENA_MANAGED_DIR_NAME
|
||||
from serena.constants import PROJECT_TEMPLATE_FILE, SELENA_CONFIG_TEMPLATE_FILE, SERENA_MANAGED_DIR_NAME
|
||||
from serena.dashboard import MemoryLogHandler, SerenaDashboardAPI
|
||||
from serena.prompt_factory import PromptFactory, SerenaPromptFactory
|
||||
from serena.symbol import SymbolManager
|
||||
@@ -295,7 +295,6 @@ class SerenaConfig(SerenaConfigBase):
|
||||
loaded_commented_yaml: CommentedMap
|
||||
|
||||
CONFIG_FILE = "serena_config.yml"
|
||||
_TEMPLATE_FILE = "serena_config.template.yml"
|
||||
|
||||
@classmethod
|
||||
def autogenerate(cls) -> None:
|
||||
@@ -304,7 +303,7 @@ class SerenaConfig(SerenaConfigBase):
|
||||
raise FileExistsError(
|
||||
f"Serena configuration file already exists at {cls.get_config_file_path()}. Please remove it if you want to autogenerate a new one."
|
||||
)
|
||||
loaded_commented_yaml = load_yaml(cls._TEMPLATE_FILE, preserve_comments=True)
|
||||
loaded_commented_yaml = load_yaml(SELENA_CONFIG_TEMPLATE_FILE, preserve_comments=True)
|
||||
save_yaml(cls.get_config_file_path(), loaded_commented_yaml, preserve_comments=True)
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
from pathlib import Path
|
||||
|
||||
_repo_root_path = Path(__file__).parent.parent.parent.resolve()
|
||||
_serena_pkg_path = Path(__file__).parent.resolve()
|
||||
|
||||
REPO_ROOT = str(_repo_root_path)
|
||||
PROMPT_TEMPLATES_DIR = str(_repo_root_path / "config" / "prompt_templates")
|
||||
CONTEXT_YAMLS_DIR = str(_repo_root_path / "config" / "contexts")
|
||||
MODE_YAMLS_DIR = str(_repo_root_path / "config" / "modes")
|
||||
PROMPT_TEMPLATES_DIR = str(_serena_pkg_path / "resources" / "config" / "prompt_templates")
|
||||
CONTEXT_YAMLS_DIR = str(_serena_pkg_path / "resources" / "config" / "contexts")
|
||||
MODE_YAMLS_DIR = str(_serena_pkg_path / "resources" / "config" / "modes")
|
||||
|
||||
SERENA_MANAGED_DIR_NAME = ".serena"
|
||||
|
||||
DEFAULT_CONTEXT = "desktop-app"
|
||||
DEFAULT_MODES = ("interactive", "editing")
|
||||
|
||||
PROJECT_TEMPLATE_FILE = str(_repo_root_path / "project.template.yml")
|
||||
PROJECT_TEMPLATE_FILE = str(_serena_pkg_path / "resources" / "project.template.yml")
|
||||
SELENA_CONFIG_TEMPLATE_FILE = str(_serena_pkg_path / "resources" / "serena_config.template.yml")
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user