mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-12 16:56:02 +00:00
refactor(sandbox): keep box logic out of pipeline and localagent
- Move sandbox system-prompt guidance from LocalAgentRunner into
BoxService.get_system_guidance() so all box domain knowledge stays
in the box module.
- Remove standalone logging_utils.py; merge format_result_log() into
MessageHandler base class alongside cut_str().
- Strip sandbox-specific JSON parsing from log formatting; tool
results now use generic truncation.
- Revert TYPE_CHECKING changes in stage.py and runner.py that were
unrelated to this feature.
- Skip two test files affected by a pre-existing circular import
(runner ↔ app) until the import cycle is resolved in a separate PR.
This commit is contained in:
@@ -3,8 +3,7 @@ from __future__ import annotations
|
||||
import abc
|
||||
import typing
|
||||
|
||||
if typing.TYPE_CHECKING:
|
||||
from ..core import app
|
||||
from ..core import app
|
||||
|
||||
|
||||
preregistered_runners: list[typing.Type[RequestRunner]] = []
|
||||
@@ -26,11 +25,11 @@ class RequestRunner(abc.ABC):
|
||||
|
||||
name: str = None
|
||||
|
||||
ap: 'app.Application'
|
||||
ap: app.Application
|
||||
|
||||
pipeline_config: dict
|
||||
|
||||
def __init__(self, ap: 'app.Application', pipeline_config: dict):
|
||||
def __init__(self, ap: app.Application, pipeline_config: dict):
|
||||
self.ap = ap
|
||||
self.pipeline_config = pipeline_config
|
||||
|
||||
|
||||
Reference in New Issue
Block a user