fix(backend): ensure microagents are loaded for V1 conversations (#11772)

Co-authored-by: Engel Nyst <engel.nyst@gmail.com>
This commit is contained in:
Hiep Le
2025-11-19 18:54:08 +07:00
committed by GitHub
parent bede37fdb6
commit 36cf4e161a
41 changed files with 1355 additions and 70 deletions

View File

@@ -247,9 +247,9 @@ def build_runtime_image_in_folder(
lock_tag=lock_tag,
# Only tag the versioned image if we are building from scratch.
# This avoids too much layers when you lay one image on top of another multiple times
versioned_tag=versioned_tag
if build_from == BuildFromImageType.SCRATCH
else None,
versioned_tag=(
versioned_tag if build_from == BuildFromImageType.SCRATCH else None
),
platform=platform,
extra_build_args=extra_build_args,
)
@@ -282,10 +282,8 @@ def prep_build_folder(
),
)
# Copy the 'microagents' directory (Microagents)
shutil.copytree(
Path(project_root, 'microagents'), Path(build_folder, 'code', 'microagents')
)
# Copy the 'skills' directory (Skills)
shutil.copytree(Path(project_root, 'skills'), Path(build_folder, 'code', 'skills'))
# Copy pyproject.toml and poetry.lock files
for file in ['pyproject.toml', 'poetry.lock']:

View File

@@ -336,8 +336,8 @@ RUN \
# ================================================================
RUN if [ -d /openhands/code/openhands ]; then rm -rf /openhands/code/openhands; fi
COPY --chown=openhands:openhands ./code/pyproject.toml ./code/poetry.lock /openhands/code/
RUN if [ -d /openhands/code/microagents ]; then rm -rf /openhands/code/microagents; fi
COPY --chown=openhands:openhands ./code/microagents /openhands/code/microagents
RUN if [ -d /openhands/code/skills ]; then rm -rf /openhands/code/skills; fi
COPY --chown=openhands:openhands ./code/skills /openhands/code/skills
COPY --chown=openhands:openhands ./code/openhands /openhands/code/openhands
RUN chmod a+rwx /openhands/code/openhands/__init__.py && \
chown -R openhands:openhands /openhands/code