feat: Add Common Tiles Reference and Enhance Asset Management

- Introduced a new common_tiles.txt file for AI agents, providing a customizable reference for various tile types used in projects.
- Updated CMake configuration to improve asset copying for macOS and non-Apple platforms, ensuring agent assets are correctly placed in the output directory.
- Enhanced the AssetLoader to support additional search paths for asset retrieval, improving cross-platform compatibility.
- Improved error handling in the AgentEditor for missing prompt files, providing clearer instructions for users on file locations and creation.
This commit is contained in:
scawful
2025-10-05 12:16:59 -04:00
parent a7c384a37d
commit 5034e1e97d
7 changed files with 125 additions and 44 deletions

View File

@@ -178,8 +178,18 @@ if (APPLE)
target_link_libraries(yaze PUBLIC ${COCOA_LIBRARY})
endif()
# Post-build step to copy assets to output directory (Windows/Linux)
if(NOT APPLE)
# Post-build step to copy assets to output directory
if(APPLE)
# macOS: Copy to bundle Resources
add_custom_command(TARGET yaze POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory
$<TARGET_FILE_DIR:yaze>/../Resources/agent
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_SOURCE_DIR}/assets/agent
$<TARGET_FILE_DIR:yaze>/../Resources/agent
COMMENT "Copying agent assets to macOS bundle"
)
elseif(NOT APPLE)
# Add post-build commands directly to the yaze target
# Copy fonts
add_custom_command(TARGET yaze POST_BUILD
@@ -201,6 +211,18 @@ if(NOT APPLE)
COMMENT "Copying theme assets"
)
# Copy agent assets (system prompts, etc.)
if(EXISTS ${CMAKE_SOURCE_DIR}/assets/agent)
add_custom_command(TARGET yaze POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory
$<TARGET_FILE_DIR:yaze>/assets/agent
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_SOURCE_DIR}/assets/agent
$<TARGET_FILE_DIR:yaze>/assets/agent
COMMENT "Copying agent assets (prompts, schemas)"
)
endif()
# Copy other assets if they exist
if(EXISTS ${CMAKE_SOURCE_DIR}/assets/layouts)
add_custom_command(TARGET yaze POST_BUILD