feat: implement AI integration with backend configuration and rule-based enrichment actions
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package status
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.pengzhan.dev/haopengzhan/rsspipe/internal/models"
|
||||
"git.pengzhan.dev/haopengzhan/rsspipe/internal/worker"
|
||||
)
|
||||
|
||||
// NewMarkReadHandler marks an entry as read.
|
||||
func NewMarkReadHandler() worker.ActionHandler {
|
||||
return func(ctx context.Context, entry models.FeedEntry, params map[string]interface{}) (*worker.ActionResult, error) {
|
||||
trueVal := true
|
||||
return &worker.ActionResult{
|
||||
MarkRead: &trueVal,
|
||||
}, nil
|
||||
}
|
||||
}
|
||||
|
||||
// NewMarkStarredHandler marks an entry as starred.
|
||||
func NewMarkStarredHandler() worker.ActionHandler {
|
||||
return func(ctx context.Context, entry models.FeedEntry, params map[string]interface{}) (*worker.ActionResult, error) {
|
||||
trueVal := true
|
||||
return &worker.ActionResult{
|
||||
MarkStarred: &trueVal,
|
||||
}, nil
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user