Feat: Modify the style of the release confirmation box. (#13542)

### What problem does this PR solve?

Feat: Modify the style of the release confirmation box.

### Type of change


- [x] New Feature (non-breaking change which adds functionality)

---------

Co-authored-by: Yingfeng <yingfeng.zhang@gmail.com>
Co-authored-by: balibabu <assassin_cike@163.com>
Co-authored-by: 6ba3i <isbaaoui09@gmail.com>
This commit is contained in:
balibabu
2026-03-13 16:31:17 +08:00
committed by GitHub
parent 02070bab2a
commit 717f1f1362
12 changed files with 196 additions and 97 deletions

View File

@ -543,12 +543,15 @@ def test_create_and_update_guard_matrix(monkeypatch):
assert "Fail to create a session" in res["message"]
monkeypatch.setattr(module, "request", SimpleNamespace(args=_Args()))
monkeypatch.setattr(module.UserCanvasService, "get_by_id", lambda _id: (False, None))
monkeypatch.setattr(module.UserCanvasService, "query", lambda **_kwargs: [SimpleNamespace(id="agent-1")])
def _raise_lookup(*_args, **_kwargs):
raise LookupError("Agent not found.")
monkeypatch.setattr(module.UserCanvasService, "get_agent_dsl_with_release", _raise_lookup)
res = _run(inspect.unwrap(module.create_agent_session)("tenant-1", "agent-1"))
assert res["message"] == "Agent not found."
canvas = SimpleNamespace(dsl="{}", id="agent-1")
monkeypatch.setattr(module.UserCanvasService, "get_by_id", lambda _id: (True, canvas))
monkeypatch.setattr(module.UserCanvasService, "query", lambda **_kwargs: [])
res = _run(inspect.unwrap(module.create_agent_session)("tenant-1", "agent-1"))
assert res["message"] == "You cannot access the agent."

View File

@ -183,6 +183,14 @@ def _load_canvas_module(monkeypatch):
api_pkg.__path__ = [str(repo_root / "api")]
monkeypatch.setitem(sys.modules, "api", api_pkg)
db_pkg = ModuleType("api.db")
db_pkg.__path__ = [str(repo_root / "api" / "db")]
monkeypatch.setitem(sys.modules, "api.db", db_pkg)
db_services_pkg = ModuleType("api.db.services")
db_services_pkg.__path__ = [str(repo_root / "api" / "db" / "services")]
monkeypatch.setitem(sys.modules, "api.db.services", db_services_pkg)
apps_mod = ModuleType("api.apps")
apps_mod.__path__ = []
apps_mod.current_user = SimpleNamespace(id="user-1")
@ -327,6 +335,12 @@ def _load_canvas_module(monkeypatch):
)
monkeypatch.setitem(sys.modules, "api.db.services.file_service", file_service_mod)
knowledgebase_service_mod = ModuleType("api.db.services.knowledgebase_service")
knowledgebase_service_mod.KnowledgebaseService = SimpleNamespace(
query=lambda **_kwargs: [],
)
monkeypatch.setitem(sys.modules, "api.db.services.knowledgebase_service", knowledgebase_service_mod)
pipeline_log_service_mod = ModuleType("api.db.services.pipeline_operation_log_service")
pipeline_log_service_mod.PipelineOperationLogService = SimpleNamespace(
get_documents_info=lambda *_args, **_kwargs: [],