personal memory agent
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add optional guidance string to --auto flag and detect_created()

Changes --auto from a boolean flag to an optional-string argument
(nargs="?") so users can pass guidance text that gets injected into
the LLM content for better metadata parsing of ambiguous files.

+12 -4
+5 -1
think/detect_created.py
··· 48 48 49 49 50 50 def detect_created( 51 - path: str, original_filename: Optional[str] = None 51 + path: str, original_filename: Optional[str] = None, guidance: Optional[str] = None 52 52 ) -> Optional[dict]: 53 53 """Return creation time information for *path* using configured provider. 54 54 ··· 58 58 Path to the file to analyze 59 59 original_filename : Optional[str] 60 60 Original filename if path is a temporary file 61 + guidance : Optional[str] 62 + Optional guidance text from the user to help the LLM interpret ambiguous metadata 61 63 """ 62 64 metadata = _extract_metadata(path) 63 65 ··· 81 83 82 84 lines.append(metadata) 83 85 markdown = "\n".join(lines) 86 + if guidance: 87 + markdown += f"\n\nImportant guidance from the user: {guidance}" 84 88 85 89 # Debug: write content to temp file 86 90 _debug_write_content(markdown, path)
+7 -3
think/importers/cli.py
··· 191 191 ) 192 192 parser.add_argument( 193 193 "--auto", 194 - action="store_true", 195 - help="Auto-accept detected timestamp and proceed with import", 194 + nargs="?", 195 + const=True, 196 + default=None, 197 + help="Auto-accept detected timestamp. Optionally provide guidance text for the LLM (e.g., --auto 'timestamps are Pacific time').", 196 198 ) 197 199 parser.add_argument( 198 200 "--dry-run", ··· 247 249 if not args.timestamp: 248 250 # Pass the original filename for better detection 249 251 detection_result = detect_created( 250 - args.media, original_filename=os.path.basename(args.media) 252 + args.media, 253 + original_filename=os.path.basename(args.media), 254 + guidance=args.auto if isinstance(args.auto, str) else None, 251 255 ) 252 256 if ( 253 257 detection_result