feat: add Chinese UI, Responses models, and mirrored Windows setup
CI / Python 3.12 / ubuntu-latest (push) Canceled after 0s
CI / Python 3.12 / windows-latest (push) Canceled after 0s
CI / Frontend tests and production build (push) Canceled after 0s
CI / Build and smoke-test Python packages (push) Canceled after 0s

Localize the web console and persist custom model and capability settings.
Use OpenAI Responses exclusively and move runtime limits into environment configuration.
Bootstrap uv and the virtual environment on Windows, support optional China mirrors,
and package source distributions without environments, build output, or credentials.

Update regression tests and repository quality checks for the new behavior.
This commit is contained in:
chenmingxuan committed 2026-09-22 19:16:17 +08:00
1 parent 371aa6df56
commit 2ddec53954
183 files changed
+3427 -11857

No files matched your search

-40
View File
@@ -25,7 +25,6 @@ import concurrent.futures
import inspect
from typing import Annotated, Any, Literal
from google.genai import types as genai_types
from langchain_core.tools import BaseTool, StructuredTool
from langgraph.prebuilt import InjectedState
from pydantic import BaseModel
@@ -148,45 +147,6 @@ class ArtemisTool:
parameters={"type": "object", "properties": properties, "required": required},
)
def to_genai_declaration(self) -> genai_types.FunctionDeclaration:
"""Exports this tool to a Google GenAI FunctionDeclaration schema."""
flat_properties, required = self._flat_schema()
properties = {}
for prop_name, prop in flat_properties.items():
genai_type = _GENAI_TYPES.get(prop["type"], genai_types.Type.STRING)
items_schema = None
if genai_type == genai_types.Type.ARRAY:
item_type = (prop.get("items") or {}).get("type", "string")
items_schema = genai_types.Schema(
type=_GENAI_TYPES.get(item_type, genai_types.Type.STRING)
)
properties[prop_name] = genai_types.Schema(
type=genai_type,
description=prop.get("description", ""),
items=items_schema,
enum=[str(v) for v in prop["enum"]] if prop.get("enum") else None,
)
return genai_types.FunctionDeclaration(
name=self.name,
description=self.description,
parameters=genai_types.Schema(
type=genai_types.Type.OBJECT,
properties=properties,
required=required,
),
)
_GENAI_TYPES = {
"string": genai_types.Type.STRING,
"integer": genai_types.Type.INTEGER,
"number": genai_types.Type.NUMBER,
"boolean": genai_types.Type.BOOLEAN,
"array": genai_types.Type.ARRAY,
"object": genai_types.Type.OBJECT,
}
def _flatten_property(prop_data: dict[str, Any]) -> dict[str, Any]:
"""One Pydantic JSON-schema property as a flat single-type entry.