Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
import {
extractedSearchFields,
type SearchExtraction,
} from '../queries/extracted-search';
// Fixed provider answers exercise the UI contract without duplicating a language parser.
const answers: Record<string, SearchExtraction> = {
'search in progress high priority tasks assigned to julia created by john about android':
{
type: 'task',
query: 'android',
status: ['In Progress'],
priority: ['High'],
assignees: ['Julia'],
created_by: ['John'],
},
'find hiring': { type: 'all', query: 'hiring' },
'find hiring plan': { type: 'all', query: 'hiring plan' },
'find my notes on how blowholes work': {
type: 'all',
query: 'how blowholes work',
},
'find how blowholes work in the ocean': {
type: 'all',
query: 'how blowholes work in the ocean',
},
'search all recent messages from julia': {
query: null,
type: 'channels',
from: ['Julia'],
in: [],
},
'search messages from julia in #sales about budget': {
query: 'budget',
type: 'channels',
from: ['Julia'],
in: ['sales'],
},
'search messages from julia about budget': {
query: 'budget',
type: 'channels',
from: ['Julia'],
in: [],
},
'search messages from julia about forecast': {
query: 'forecast',
type: 'channels',
from: ['Julia'],
in: [],
},
'search messages from Pat about budget': {
query: 'budget',
type: 'channels',
from: ['Pat'],
in: [],
},
'search all messages about __budget__': {
query: '__budget__',
type: 'channels',
from: [],
in: [],
},
'search all messages about **budget**': {
query: '**budget**',
type: 'channels',
from: [],
in: [],
},
'search messages about forecast': {
query: 'forecast',
type: 'channels',
from: [],
in: [],
},
'search messages in "Julia direct message" about budget': {
query: 'budget',
type: 'channels',
in: ['Julia direct message'],
from: [],
},
'search all my documents about Scope': {
query: 'Scope',
type: 'document-or-file',
},
};
export function fixtureSearchFields(text: string) {
return extractedSearchFields(
answers[text.trim()] ?? { type: 'all', query: text }
);
}