feat(metadata): enhance metadata handling by sanitizing extracted data and updating documentation for file storage

This commit is contained in:
2026-03-30 23:14:08 +02:00
parent 72b4f7ce3d
commit e6f00ce636
11 changed files with 108 additions and 17 deletions

View File

@@ -252,6 +252,10 @@ func (c *Client) ExtractMetadata(ctx context.Context, input string) (thoughttype
err = fallbackErr
}
if ctx.Err() != nil {
return thoughttypes.ThoughtMetadata{}, fmt.Errorf("%s metadata: %w", c.name, ctx.Err())
}
heuristic := heuristicMetadataFromInput(input)
if c.log != nil {
c.log.Warn("metadata extraction failed for all models, using heuristic fallback",