File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ /**
2+ * Return a `YYYY-MM-DD` date stamp for the given date using local time.
3+ *
4+ * @param date - The date to format (defaults to now).
5+ * @returns A `YYYY-MM-DD` formatted string in local time.
6+ */
17export function getLocalDateStamp ( date : Date = new Date ( ) ) : string {
28 const year = date . getFullYear ( ) ;
39 const month = String ( date . getMonth ( ) + 1 ) . padStart ( 2 , '0' ) ;
@@ -6,6 +12,12 @@ export function getLocalDateStamp(date: Date = new Date()): string {
612 return `${ year } -${ month } -${ day } ` ;
713}
814
15+ /**
16+ * Build the daily note markdown filename for the given date.
17+ *
18+ * @param date - The date to use (defaults to now).
19+ * @returns A filename like `openmeta-daily-2026-06-18.md`.
20+ */
921export function getDailyNoteFileName ( date : Date = new Date ( ) ) : string {
1022 return `openmeta-daily-${ getLocalDateStamp ( date ) } .md` ;
1123}
Original file line number Diff line number Diff line change 11import type { LLMReasoningEffort } from '../types/index.js' ;
22
3+ /** All supported reasoning effort levels, ordered from least to most intensive. */
34export const LLM_REASONING_EFFORTS = [
45 'none' ,
56 'minimal' ,
@@ -8,8 +9,16 @@ export const LLM_REASONING_EFFORTS = [
89 'high' ,
910 'xhigh' ,
1011] as const satisfies readonly LLMReasoningEffort [ ] ;
12+ /** Default reasoning effort applied when no override is configured. */
1113export const DEFAULT_LLM_REASONING_EFFORT : LLMReasoningEffort = 'none' ;
1214
15+ /**
16+ * Parse a user-supplied string into a valid {@link LLMReasoningEffort}.
17+ *
18+ * @param value - Raw string input (case-insensitive, whitespace-trimmed).
19+ * @returns The matching effort level.
20+ * @throws {Error } If the value does not match any known effort level.
21+ */
1322export function parseLLMReasoningEffort ( value : string ) : LLMReasoningEffort {
1423 const normalized = value . trim ( ) . toLowerCase ( ) ;
1524 if ( LLM_REASONING_EFFORTS . includes ( normalized as LLMReasoningEffort ) ) {
You can’t perform that action at this time.
0 commit comments