Commit Graph

22 Commits

Author SHA1 Message Date
Kayvan Sylvan
d9d8f7bf96 feat: add Save method to PatternsEntity for persisting patterns to filesystem
## CHANGES

- Add Save method to PatternsEntity struct
- Create pattern directory with proper permissions
- Write pattern content to system pattern file
- Add comprehensive test for Save functionality
- Verify directory creation and file contents
- Handle errors for directory and file operations
2025-06-13 15:52:01 -07:00
Kayvan Sylvan
bf3af8e98e feat: add shell completion scripts for Zsh, Bash, and Fish
CHANGES:
- Add shell completion support for three major shells
- Create standardized completion scripts in completions/ directory
- Add --shell-complete-list flag for machine-readable output
- Update Print() methods to support plain output format
- Document installation steps for each shell in README
- Replace old fish completion script with improved version
2025-04-24 17:47:39 -07:00
Sherif Fanous
9000f92a55 Fix error in deleting patterns due to non empty directory 2025-04-17 12:05:52 -04:00
jaredmontoya
1f765c5b53 flake: fix/update 2025-02-26 16:12:05 +01:00
Alexandre Bassel
021d2738e4 Fixed few typos that I could find 2025-01-10 03:44:54 -03:00
github-actions[bot]
aa2881f3c2 Update version to v1.4.121 and commit 2024-12-13 21:17:35 +00:00
Matt Joyce
e795055d13 Fix: Mask input token to prevent var substitution in patterns 2024-12-14 06:57:53 +11:00
github-actions[bot]
2d8b46b878 Update version to v1.4.119 and commit 2024-12-07 11:24:51 +00:00
Matt Joyce
09fb913279 Fix #1169: Add robust handling for paths and symlinks in GetAbsolutePath 2024-12-07 19:04:39 +11:00
Eugen Eisler
7fd4fa4742 fix: close #1173 2024-11-30 20:44:31 +01:00
Eugen Eisler
ed657383fb chore: cleanup style 2024-11-28 19:34:07 +01:00
Eugen Eisler
e9a75528ab chore: cleanup style 2024-11-28 18:36:01 +01:00
github-actions[bot]
edb814c9f0 Update version to v1.4.111 and commit 2024-11-26 09:43:27 +00:00
Matt Joyce
b6eb969b3a feat(template): implement core plugin system and utility plugins
Add initial set of utility plugins for the template system:
- datetime: Date/time formatting and manipulation
- fetch: HTTP content retrieval and processing
- file: File system operations and content handling
- sys: System information and environment access
- text: String manipulation and formatting operations

Each plugin includes:
- Implementation with comprehensive test coverage
- Markdown documentation of capabilities
- Integration with template package

This builds on the template system to provide practical utility functions
while maintaining a focused scope for the initial plugin release.
2024-11-21 14:27:22 +11:00
Matt Joyce
d475e7b568 feat(template): introduce template package for variable substitution
- Add new template package to handle variable substitution with {{variable}} syntax
- Move substitution logic from patterns to centralized template system
- Update patterns.go to use template package for variable processing
- Support special {{input}} handling for pattern content
- Update chatter.go and rest API to pass input parameter
- Enable multiple passes to handle nested variables
- Report errors for missing required variables

This change sets up a foundation for future templating features like front matter
and plugin support while keeping the substitution logic centralized.
2024-11-19 16:57:14 +11:00
Matt Joyce
1f07ea25a2 refactor: unify pattern loading and variable handling
- Stronger separation of concerns between chatter.go and patterns.go
- Consolidate pattern loading logic into GetPattern method
- Support both file and database patterns through single interface
- Maintain API compatibility with Storage interface
- Handle variable substitution in one place
- Keep backward compatibility for REST API through Get method

The changes enable cleaner pattern handling while maintaining
existing interfaces and adding file-based pattern support.
2024-11-19 10:31:06 +11:00
Matt Joyce
af4752d324 feat: add file-based pattern support
Allow patterns to be loaded directly from files using explicit path prefixes
(~/, ./, /, or \). This enables easier testing and iteration of patterns
without requiring installation into the fabric config structure.

- Supports relative paths (./pattern.txt, ../pattern.txt)
- Supports home directory expansion (~/patterns/test.txt)
- Supports absolute paths
- Maintains backwards compatibility with named patterns
- Requires explicit path markers to distinguish from pattern names

Example usage:
  fabric --pattern ./draft-pattern.txt
  fabric --pattern ~/patterns/my-pattern.txt
  fabric --pattern ../../shared-patterns/test.txt
2024-11-17 14:39:49 +11:00
Eugen Eisler
9c9897706b feat: impl. multi-model / attachments, images 2024-10-29 22:03:47 +01:00
Eugen Eisler
9e8ad44cdf feat: impl. multi-model / attachments, images 2024-10-29 22:01:24 +01:00
Eugen Eisler
69aefc16f6 feat: impl. multi-model / attachments, images 2024-10-29 20:38:15 +01:00
Eugen Eisler
609df943dd feat: plugins arch., new setup procedure 2024-10-19 13:09:58 +02:00
Eugen Eisler
61f66f88e3 feat: plugins arch., new setup procedure 2024-10-19 13:09:37 +02:00