Create action submodule, add various examples

This commit is contained in:
2025-05-13 20:07:31 -04:00
parent 87a56ac40b
commit 2bdca72e04
39 changed files with 956 additions and 177 deletions

26
examples/file_select.py Normal file
View File

@ -0,0 +1,26 @@
import asyncio
from falyx import Falyx
from falyx.action import SelectFileAction
from falyx.action.types import FileReturnType
sf = SelectFileAction(
name="select_file",
suffix_filter=".py",
title="Select a YAML file",
prompt_message="Choose > ",
return_type=FileReturnType.TEXT,
columns=3,
)
flx = Falyx()
flx.add_command(
key="S",
description="Select a file",
action=sf,
help_text="Select a file from the current directory",
)
if __name__ == "__main__":
asyncio.run(flx.run())