refactor: remove _serialized field and implement efficient vars selection
- Remove _serialized field from vars interface to prevent serialization errors with throwing passBackend field - Implement direct selection of generator fields using multi-select syntax - Refactor vars_generators() to use new Generator.from_flake() method that selects only safe fields (avoiding non-serializable values) - Remove unused legacy methods: Generator.from_json(), Var.from_json(), Prompt.from_json() - Update precaching to match new selection approach This fixes the serialization errors that were preventing vars from working with the new password-store implementation by avoiding the problematic _serialized field entirely.
This commit is contained in:
@@ -32,12 +32,12 @@ class Prompt:
|
||||
previous_value: str | None = None
|
||||
|
||||
@classmethod
|
||||
def from_json(cls: type["Prompt"], data: dict[str, Any]) -> "Prompt":
|
||||
def from_nix(cls: type["Prompt"], data: dict[str, Any]) -> "Prompt":
|
||||
return cls(
|
||||
name=data["name"],
|
||||
description=data["description"],
|
||||
prompt_type=PromptType(data["type"]),
|
||||
persist=data.get("persist", data["persist"]),
|
||||
description=data.get("description", data["name"]),
|
||||
prompt_type=PromptType(data.get("type", "line")),
|
||||
persist=data.get("persist", False),
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user