From c4ce93956199e266fdf4910afbda38cf890b37e2 Mon Sep 17 00:00:00 2001 From: Frankie Yan <8531248+frankieyan@users.noreply.github.com> Date: Wed, 4 Nov 2026 17:07:10 -0700 Subject: [PATCH 1/7] fix: link conversation search results to the chat and message Co-Authored-By: Claude --- src/commands/search.test.ts | 42 +++++++++++++++++++++++++++++++++++++ src/lib/search-helpers.ts | 9 ++++++-- 2 files changed, 49 insertions(+), 2 deletions(-) diff --git a/src/commands/search.test.ts b/src/commands/search.test.ts index d42925f..2e3efe3 100644 --- a/src/commands/search.test.ts +++ b/src/commands/search.test.ts @@ -122,3 +122,45 @@ describe('search --workspace conflict', () => { ) }) }) + +describe('search result URLs', () => { + const conversationResult = { + id: 'conversation_BY2ETq2pEneE5MxErhvx5', + type: 'conversation', + title: "Jack's Outcasts", + snippet: "Jack's Outcasts", + snippetCreatorId: 23910351, + snippetLastUpdated: new Date('2026-11-04T00:00:00Z'), + conversationId: 'BY2ETq2pEneE5MxErhvx5', + } + + async function searchForUrl(result: Record): Promise { + searchApiMocks.extendedSearch.mockResolvedValue({ + items: [result], + hasMore: false, + isPlanRestricted: false, + }) + const program = createProgram() + const logSpy = captureConsole('log') + + await program.parseAsync(['node', 'tdc', 'search', 'Outcasts', '--json']) + + return JSON.parse(logSpy.mock.calls[0][0]).results[0].url + } + + beforeEach(() => { + vi.clearAllMocks() + }) + + it('links a chat with no messageId to the conversation', async () => { + await expect(searchForUrl(conversationResult)).resolves.toMatch( + /\/1\/msg\/BY2ETq2pEneE5MxErhvx5\/$/, + ) + }) + + it('links a message hit to the message in its conversation', async () => { + await expect( + searchForUrl({ ...conversationResult, messageId: 'Cgim4JfqR97yE3PoxUYrj' }), + ).resolves.toMatch(/\/1\/msg\/BY2ETq2pEneE5MxErhvx5\/m\/Cgim4JfqR97yE3PoxUYrj\/?$/) + }) +}) diff --git a/src/lib/search-helpers.ts b/src/lib/search-helpers.ts index 1fd2649..8139a2d 100644 --- a/src/lib/search-helpers.ts +++ b/src/lib/search-helpers.ts @@ -217,6 +217,7 @@ function buildSearchResultUrl( channelId?: string | null conversationId?: string | null commentId?: string | null + messageId?: string | null }, ): string { if (result.type === 'thread' && result.threadId && result.channelId) { @@ -234,8 +235,12 @@ function buildSearchResultUrl( commentId: result.commentId, }) } - if (result.type === 'conversation') { - return getFullCommsURL({ workspaceId, conversationId: result.id }) + if (result.type === 'conversation' && result.conversationId) { + return getFullCommsURL({ + workspaceId, + conversationId: result.conversationId, + messageId: result.messageId ?? undefined, + }) } if (result.type === 'message' && result.conversationId) { return getFullCommsURL({ From 95033a29ea8d8ae62cac6261179e3cf8e939983d Mon Sep 17 00:00:00 2001 From: Frankie Yan <8531248+frankieyan@users.noreply.github.com> Date: Wed, 4 Nov 2026 17:08:30 -0700 Subject: [PATCH 2/7] feat: find group chats by title with search --type conversations Co-Authored-By: Claude --- README.md | 2 ++ skills/comms-cli/SKILL.md | 8 ++++++-- src/commands/mentions.test.ts | 9 +++++++++ src/commands/search.test.ts | 22 ++++++++++++++++++++++ src/commands/search.ts | 10 +++++++++- src/lib/search-api.test.ts | 7 +++++++ src/lib/search-api.ts | 2 +- src/lib/search-helpers.ts | 9 +++++---- src/lib/skills/content.ts | 8 ++++++-- 9 files changed, 67 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index d5f65e4..bea0c7c 100644 --- a/README.md +++ b/README.md @@ -145,6 +145,8 @@ tdc conversation undone --yes # unarchive it tdc msg view # view a conversation message tdc search "keyword" # search across workspace tdc search "keyword" --all # fetch all result pages +tdc search "name" --type conversations # find a group chat by title (whole words) +tdc conversation list --name "part" # match part of a title; combine with --participant, --kind, --state tdc react thread 👍 # add reaction tdc status # show your status tdc status set "Deep work" --emoji 🎯 --for 2h --pause-notifications # set it (--until for a date) diff --git a/skills/comms-cli/SKILL.md b/skills/comms-cli/SKILL.md index 61e400c..db1a151 100644 --- a/skills/comms-cli/SKILL.md +++ b/skills/comms-cli/SKILL.md @@ -229,7 +229,8 @@ tdc mentions # Show content mentioning current user tdc mentions --since 2026-04-01 --all # Fetch every mention since a date tdc mentions --type threads --json # Limit mentions to threads tdc search "query" # Search content -tdc search "query" --type threads # Filter: threads, messages, or all +tdc search "query" --type threads # Filter: threads, messages, conversations, or all +tdc search "name" --type conversations # Find a group chat by title tdc search "query" --author # Filter by author tdc search "query" --to # Messages sent to user tdc search "query" --title-only # Search thread titles only @@ -245,6 +246,8 @@ tdc search "query" --all # Fetch all result pages `--since` and `--until` filter by when the matching content was posted, not when a thread was last active, so a thread found by its title (`--title-only`) counts from when it was created. +To find a group chat by name, use `tdc search "name" --type conversations` first. It matches whole words in group chat titles. Use `tdc conversation list --name` for partial words, or to combine with `--participant`, `--kind`, or `--state`. + ## Users, Channels & Groups ```bash @@ -509,7 +512,8 @@ tdc thread view **Check DMs:** ```bash tdc conversation unread --json -tdc conversation list --kind group --json # find a group DM by participants/name +tdc search "Release team" --type conversations --json # find a group chat by name +tdc conversation list --kind group --json # find a group DM by participants tdc conversation view tdc conversation with "Alice Example" tdc conversation reply "Got it, thanks!" diff --git a/src/commands/mentions.test.ts b/src/commands/mentions.test.ts index 5f4e560..6de7fee 100644 --- a/src/commands/mentions.test.ts +++ b/src/commands/mentions.test.ts @@ -105,6 +105,15 @@ describe('mentions', () => { ) }) + it('rejects the conversations type', async () => { + const program = createProgram() + + await expect( + program.parseAsync(['node', 'tdc', 'mentions', '--type', 'conversations']), + ).rejects.toThrow('Allowed choices are threads, messages, all') + expect(searchApiMocks.extendedSearch).not.toHaveBeenCalled() + }) + it('emits an empty JSON payload when no mentions match', async () => { const program = createProgram() const logSpy = captureConsole('log') diff --git a/src/commands/search.test.ts b/src/commands/search.test.ts index 2e3efe3..69508cf 100644 --- a/src/commands/search.test.ts +++ b/src/commands/search.test.ts @@ -164,3 +164,25 @@ describe('search result URLs', () => { ).resolves.toMatch(/\/1\/msg\/BY2ETq2pEneE5MxErhvx5\/m\/Cgim4JfqR97yE3PoxUYrj\/?$/) }) }) + +describe('search --type conversations', () => { + beforeEach(() => { + vi.clearAllMocks() + searchApiMocks.extendedSearch.mockResolvedValue({ + items: [], + hasMore: false, + isPlanRestricted: false, + }) + }) + + it('requests the conversations type', async () => { + const program = createProgram() + captureConsole('log') + + await program.parseAsync(['node', 'tdc', 'search', 'Outcasts', '--type', 'conversations']) + + expect(searchApiMocks.extendedSearch).toHaveBeenCalledWith( + expect.objectContaining({ query: 'Outcasts', type: 'conversations' }), + ) + }) +}) diff --git a/src/commands/search.ts b/src/commands/search.ts index 78469b8..9bfcb46 100644 --- a/src/commands/search.ts +++ b/src/commands/search.ts @@ -31,6 +31,9 @@ export function registerSearchCommand(program: Command): void { .command('search [workspace-ref]') .description('Search content across a workspace'), { + typeChoices: ['threads', 'messages', 'conversations', 'all'], + typeDescription: + 'Filter: threads, messages, conversations (group chats by title), or all', addUniqueFilters: (command) => { command .option('--title-only', 'Search in thread titles only') @@ -47,7 +50,12 @@ Examples: tdc search "deployment issue" tdc search "bug report" --type threads --channel id:CbC8n2Kp4Qx6Rz9Lm3Va tdc search "API" --author id:5678 --since 2025-01-01 --json - tdc search "incident" --all --json`, + tdc search "incident" --all --json + tdc search "Release team" --type conversations --json + +To find a group chat by name, use --type conversations first. It matches whole +words in group chat titles. Use tdc conversation list --name for partial words, +or to combine with --participant, --kind, or --state.`, ) .action(search) } diff --git a/src/lib/search-api.test.ts b/src/lib/search-api.test.ts index ef5be4f..cc7efe8 100644 --- a/src/lib/search-api.test.ts +++ b/src/lib/search-api.test.ts @@ -50,6 +50,13 @@ describe('extendedSearch', () => { ) }) + it('sends the conversations type', async () => { + await extendedSearch({ workspaceId: 69, query: 'Outcasts', type: 'conversations' }) + + const requestUrl = new URL(fetchMock.mock.calls[0][0]) + expect(requestUrl.searchParams.get('type')).toBe('conversations') + }) + it('attributes the request to the CLI via Doist-Platform', async () => { await extendedSearch({ workspaceId: 69, query: 'roadmap' }) diff --git a/src/lib/search-api.ts b/src/lib/search-api.ts index 8649ea0..0bccd07 100644 --- a/src/lib/search-api.ts +++ b/src/lib/search-api.ts @@ -16,7 +16,7 @@ function getBaseUrl(authResource?: string): string { return `https://api.comms.todoist.com/api/${DEFAULT_API_VERSION}` } -export type SearchType = 'threads' | 'messages' | 'all' +export type SearchType = 'threads' | 'messages' | 'conversations' | 'all' export interface ExtendedSearchParams { workspaceId: number diff --git a/src/lib/search-helpers.ts b/src/lib/search-helpers.ts index 8139a2d..eb538f7 100644 --- a/src/lib/search-helpers.ts +++ b/src/lib/search-helpers.ts @@ -64,6 +64,8 @@ interface SearchRunResult { type SharedSearchOptionConfig = { addUniqueFilters?: (command: Command) => void limitDescription?: string + typeChoices?: SearchType[] + typeDescription?: string } export function addSharedSearchOptions( @@ -71,6 +73,8 @@ export function addSharedSearchOptions( config: SharedSearchOptionConfig = {}, ): T { const limitDescription = config.limitDescription ?? 'Max results (default: 50)' + const typeChoices = config.typeChoices ?? ['threads', 'messages', 'all'] + const typeDescription = config.typeDescription ?? 'Filter: threads, messages, or all' command .option('--workspace ', 'Workspace ID or name') @@ -78,10 +82,7 @@ export function addSharedSearchOptions( .option('--author ', 'Filter by author (comma-separated refs)') .option('--to ', 'Messages sent to user (comma-separated refs)') .addOption( - withCaseInsensitiveChoices( - new Option('--type ', 'Filter: threads, messages, or all'), - ['threads', 'messages', 'all'], - ), + withCaseInsensitiveChoices(new Option('--type ', typeDescription), typeChoices), ) config.addUniqueFilters?.(command) diff --git a/src/lib/skills/content.ts b/src/lib/skills/content.ts index d1e8092..b01b13a 100644 --- a/src/lib/skills/content.ts +++ b/src/lib/skills/content.ts @@ -233,7 +233,8 @@ tdc mentions # Show content mentioning current user tdc mentions --since 2026-04-01 --all # Fetch every mention since a date tdc mentions --type threads --json # Limit mentions to threads tdc search "query" # Search content -tdc search "query" --type threads # Filter: threads, messages, or all +tdc search "query" --type threads # Filter: threads, messages, conversations, or all +tdc search "name" --type conversations # Find a group chat by title tdc search "query" --author # Filter by author tdc search "query" --to # Messages sent to user tdc search "query" --title-only # Search thread titles only @@ -249,6 +250,8 @@ tdc search "query" --all # Fetch all result pages \`--since\` and \`--until\` filter by when the matching content was posted, not when a thread was last active, so a thread found by its title (\`--title-only\`) counts from when it was created. +To find a group chat by name, use \`tdc search "name" --type conversations\` first. It matches whole words in group chat titles. Use \`tdc conversation list --name\` for partial words, or to combine with \`--participant\`, \`--kind\`, or \`--state\`. + ## Users, Channels & Groups \`\`\`bash @@ -513,7 +516,8 @@ tdc thread view **Check DMs:** \`\`\`bash tdc conversation unread --json -tdc conversation list --kind group --json # find a group DM by participants/name +tdc search "Release team" --type conversations --json # find a group chat by name +tdc conversation list --kind group --json # find a group DM by participants tdc conversation view tdc conversation with "Alice Example" tdc conversation reply "Got it, thanks!" From bfd025fb9f552eefab2de7a4e4b51012ad0562f8 Mon Sep 17 00:00:00 2001 From: Frankie Yan <8531248+frankieyan@users.noreply.github.com> Date: Wed, 4 Nov 2026 19:23:39 -0700 Subject: [PATCH 3/7] perf(search): Skip the channel lookup when no result has a channel Co-Authored-By: Claude --- src/commands/search.test.ts | 54 +++++++++++++++++++++++++++++++++++++ src/lib/search-helpers.ts | 2 +- 2 files changed, 55 insertions(+), 1 deletion(-) diff --git a/src/commands/search.test.ts b/src/commands/search.test.ts index 69508cf..3be8960 100644 --- a/src/commands/search.test.ts +++ b/src/commands/search.test.ts @@ -31,6 +31,8 @@ vi.mock('../lib/search-api.js', () => searchApiMocks) vi.mock('chalk') +import { includePrivateChannels } from '../lib/global-args.js' +import { getPublicChannelIds } from '../lib/public-channels.js' import { registerSearchCommand } from './search.js' const createProgram = () => createTestProgram(registerSearchCommand) @@ -168,6 +170,7 @@ describe('search result URLs', () => { describe('search --type conversations', () => { beforeEach(() => { vi.clearAllMocks() + vi.mocked(includePrivateChannels).mockReturnValue(true) searchApiMocks.extendedSearch.mockResolvedValue({ items: [], hasMore: false, @@ -185,4 +188,55 @@ describe('search --type conversations', () => { expect.objectContaining({ query: 'Outcasts', type: 'conversations' }), ) }) + + it('skips the channel lookup when no result has a channel', async () => { + vi.mocked(includePrivateChannels).mockReturnValue(false) + searchApiMocks.extendedSearch.mockResolvedValue({ + items: [ + { + id: 'conversation_chat-1', + type: 'conversation', + title: 'Outcasts', + snippet: 'Outcasts', + snippetLastUpdated: new Date('2026-01-01T00:00:00Z'), + conversationId: 'chat-1', + }, + ], + hasMore: false, + isPlanRestricted: false, + }) + const program = createProgram() + captureConsole('log') + + await program.parseAsync(['node', 'tdc', 'search', 'Outcasts', '--type', 'conversations']) + + expect(getPublicChannelIds).not.toHaveBeenCalled() + }) + + it('still filters results that have a channel', async () => { + vi.mocked(includePrivateChannels).mockReturnValue(false) + vi.mocked(getPublicChannelIds).mockResolvedValue(new Set(['public-channel'])) + searchApiMocks.extendedSearch.mockResolvedValue({ + items: [ + { + id: 'thread_private', + type: 'thread', + title: 'Private thread', + snippet: 'Private thread', + snippetLastUpdated: new Date('2026-01-01T00:00:00Z'), + threadId: 'private', + channelId: 'private-channel', + }, + ], + hasMore: false, + isPlanRestricted: false, + }) + const program = createProgram() + const log = captureConsole('log') + + await program.parseAsync(['node', 'tdc', 'search', 'thread']) + + expect(getPublicChannelIds).toHaveBeenCalledTimes(1) + expect(log).not.toHaveBeenCalledWith(expect.stringContaining('Private thread')) + }) }) diff --git a/src/lib/search-helpers.ts b/src/lib/search-helpers.ts index eb538f7..ca907e8 100644 --- a/src/lib/search-helpers.ts +++ b/src/lib/search-helpers.ts @@ -185,7 +185,7 @@ async function filterVisibleSearchResults( workspaceId: number, response: ExtendedSearchResponse, ): Promise { - if (includePrivateChannels()) { + if (includePrivateChannels() || !response.items.some((item) => item.channelId)) { return response } From 6e99602e78f593b33f30ef4ae842653601d6e9f5 Mon Sep 17 00:00:00 2001 From: Frankie Yan <8531248+frankieyan@users.noreply.github.com> Date: Wed, 4 Nov 2026 20:31:57 -0700 Subject: [PATCH 4/7] test(search): Check a chat result still prints without a channel lookup Co-Authored-By: Claude --- src/commands/search.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/commands/search.test.ts b/src/commands/search.test.ts index 3be8960..3cf15ca 100644 --- a/src/commands/search.test.ts +++ b/src/commands/search.test.ts @@ -206,11 +206,12 @@ describe('search --type conversations', () => { isPlanRestricted: false, }) const program = createProgram() - captureConsole('log') + const log = captureConsole('log') await program.parseAsync(['node', 'tdc', 'search', 'Outcasts', '--type', 'conversations']) expect(getPublicChannelIds).not.toHaveBeenCalled() + expect(log).toHaveBeenCalledWith(expect.stringContaining('Outcasts')) }) it('still filters results that have a channel', async () => { From e08da0975103afc3d6180e06236896752e409534 Mon Sep 17 00:00:00 2001 From: Frankie Yan <8531248+frankieyan@users.noreply.github.com> Date: Thu, 5 Nov 2026 13:03:04 -0700 Subject: [PATCH 5/7] fix(search): Reject filters that chat results can't match Co-Authored-By: Claude --- src/commands/search.test.ts | 39 +++++++++++++++++++++++++++++++++++++ src/commands/search.ts | 8 ++++++++ 2 files changed, 47 insertions(+) diff --git a/src/commands/search.test.ts b/src/commands/search.test.ts index 3cf15ca..6cddecc 100644 --- a/src/commands/search.test.ts +++ b/src/commands/search.test.ts @@ -189,6 +189,45 @@ describe('search --type conversations', () => { ) }) + it.each([ + ['--to', ['--to', 'id:1']], + ['--channel', ['--channel', 'id:1']], + ['--mention-me', ['--mention-me']], + ])('rejects %s', async (_flag, flagArgs) => { + const program = createProgram() + + await expect( + program.parseAsync([ + 'node', + 'tdc', + 'search', + 'Outcasts', + '--type', + 'conversations', + ...flagArgs, + ]), + ).rejects.toThrow( + '--to, --channel and --mention-me cannot be used with --type conversations', + ) + expect(searchApiMocks.extendedSearch).not.toHaveBeenCalled() + }) + + it('ignores case when rejecting a flag', async () => { + const program = createProgram() + + await expect( + program.parseAsync([ + 'node', + 'tdc', + 'search', + 'Outcasts', + '--type', + 'CONVERSATIONS', + '--mention-me', + ]), + ).rejects.toThrow('cannot be used with --type conversations') + }) + it('skips the channel lookup when no result has a channel', async () => { vi.mocked(includePrivateChannels).mockReturnValue(false) searchApiMocks.extendedSearch.mockResolvedValue({ diff --git a/src/commands/search.ts b/src/commands/search.ts index 9bfcb46..a575f39 100644 --- a/src/commands/search.ts +++ b/src/commands/search.ts @@ -1,4 +1,5 @@ import { Command } from 'commander' +import { CliError } from '../lib/errors.js' import { addSharedSearchOptions, printSearchResults, @@ -16,6 +17,13 @@ async function search( workspaceRef: string | undefined, options: SearchOptions, ): Promise { + if (options.type === 'conversations' && (options.to || options.channel || options.mentionMe)) { + throw new CliError( + 'CONFLICTING_OPTIONS', + '--to, --channel and --mention-me cannot be used with --type conversations', + ) + } + const { workspaceId, response } = await runSearch(workspaceRef, { ...options, query: options.titleOnly ? undefined : query, From 77981fe7a73eaae3d77fd81b8f2d72582f6d83cc Mon Sep 17 00:00:00 2001 From: Frankie Yan <8531248+frankieyan@users.noreply.github.com> Date: Thu, 5 Nov 2026 13:03:11 -0700 Subject: [PATCH 6/7] fix(search): Link comment hits to the comment Co-Authored-By: Claude --- src/commands/search.test.ts | 48 +++++++++++++++++++++++++++++++++++++ src/lib/search-helpers.ts | 17 +------------ 2 files changed, 49 insertions(+), 16 deletions(-) diff --git a/src/commands/search.test.ts b/src/commands/search.test.ts index 6cddecc..005685f 100644 --- a/src/commands/search.test.ts +++ b/src/commands/search.test.ts @@ -167,6 +167,54 @@ describe('search result URLs', () => { }) }) +describe('search result links', () => { + beforeEach(() => { + vi.clearAllMocks() + vi.mocked(includePrivateChannels).mockReturnValue(true) + }) + + function mockThreadHit(commentId?: string) { + searchApiMocks.extendedSearch.mockResolvedValue({ + items: [ + { + id: 'thread_thread-1', + type: 'thread', + title: 'Release', + snippet: 'Release', + snippetLastUpdated: new Date('2026-01-01T00:00:00Z'), + threadId: 'thread-1', + channelId: 'channel-1', + commentId, + }, + ], + hasMore: false, + isPlanRestricted: false, + }) + } + + it('links a comment hit to the comment', async () => { + mockThreadHit('comment-1') + const program = createProgram() + const log = captureConsole('log') + + await program.parseAsync(['node', 'tdc', 'search', 'Release']) + + expect(log).toHaveBeenCalledWith( + expect.stringContaining('/ch/channel-1/t/thread-1/c/comment-1'), + ) + }) + + it('links a thread hit to the thread', async () => { + mockThreadHit() + const program = createProgram() + const log = captureConsole('log') + + await program.parseAsync(['node', 'tdc', 'search', 'Release']) + + expect(log).toHaveBeenCalledWith(expect.stringMatching(/\/ch\/channel-1\/t\/thread-1\/?$/)) + }) +}) + describe('search --type conversations', () => { beforeEach(() => { vi.clearAllMocks() diff --git a/src/lib/search-helpers.ts b/src/lib/search-helpers.ts index ca907e8..8b90abe 100644 --- a/src/lib/search-helpers.ts +++ b/src/lib/search-helpers.ts @@ -212,7 +212,6 @@ export async function runSearch( function buildSearchResultUrl( workspaceId: number, result: { - id: string type: string threadId?: string | null channelId?: string | null @@ -226,14 +225,7 @@ function buildSearchResultUrl( workspaceId, channelId: result.channelId, threadId: result.threadId, - }) - } - if (result.type === 'comment' && result.threadId && result.channelId && result.commentId) { - return getFullCommsURL({ - workspaceId, - channelId: result.channelId, - threadId: result.threadId, - commentId: result.commentId, + commentId: result.commentId ?? undefined, }) } if (result.type === 'conversation' && result.conversationId) { @@ -243,13 +235,6 @@ function buildSearchResultUrl( messageId: result.messageId ?? undefined, }) } - if (result.type === 'message' && result.conversationId) { - return getFullCommsURL({ - workspaceId, - conversationId: result.conversationId, - messageId: result.id, - }) - } return getFullCommsURL({ workspaceId }) } From 0651e9740ec1c36de9a7bb41d1d9faa1d31e8903 Mon Sep 17 00:00:00 2001 From: Frankie Yan <8531248+frankieyan@users.noreply.github.com> Date: Thu, 5 Nov 2026 13:03:23 -0700 Subject: [PATCH 7/7] docs(search): Explain the limits of --type conversations Co-Authored-By: Claude --- README.md | 4 ++-- skills/comms-cli/SKILL.md | 4 +++- src/commands/search.ts | 8 ++++++-- src/lib/skills/content.ts | 4 +++- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index bea0c7c..91da5ca 100644 --- a/README.md +++ b/README.md @@ -145,8 +145,8 @@ tdc conversation undone --yes # unarchive it tdc msg view # view a conversation message tdc search "keyword" # search across workspace tdc search "keyword" --all # fetch all result pages -tdc search "name" --type conversations # find a group chat by title (whole words) -tdc conversation list --name "part" # match part of a title; combine with --participant, --kind, --state +tdc search "name" --type conversations # find a titled group chat (whole words) +tdc conversation list --name "part" # match part of a title; use --participant for chats without a title tdc react thread 👍 # add reaction tdc status # show your status tdc status set "Deep work" --emoji 🎯 --for 2h --pause-notifications # set it (--until for a date) diff --git a/skills/comms-cli/SKILL.md b/skills/comms-cli/SKILL.md index db1a151..5add062 100644 --- a/skills/comms-cli/SKILL.md +++ b/skills/comms-cli/SKILL.md @@ -246,7 +246,9 @@ tdc search "query" --all # Fetch all result pages `--since` and `--until` filter by when the matching content was posted, not when a thread was last active, so a thread found by its title (`--title-only`) counts from when it was created. -To find a group chat by name, use `tdc search "name" --type conversations` first. It matches whole words in group chat titles. Use `tdc conversation list --name` for partial words, or to combine with `--participant`, `--kind`, or `--state`. +To find a group chat by name, use `tdc search "name" --type conversations` first. It matches whole words in group chat titles, and skips chats without a title. Use `tdc conversation list --name` for partial words, or `--participant` for chats without a title. Both `--name` and `--participant` can be combined with `--kind` or `--state`. + +`--type conversations` can't be combined with `--to`, `--channel`, or `--mention-me`. `--author` and `--since`/`--until` match the chat's creator and creation date. ## Users, Channels & Groups diff --git a/src/commands/search.ts b/src/commands/search.ts index a575f39..8484cd3 100644 --- a/src/commands/search.ts +++ b/src/commands/search.ts @@ -62,8 +62,12 @@ Examples: tdc search "Release team" --type conversations --json To find a group chat by name, use --type conversations first. It matches whole -words in group chat titles. Use tdc conversation list --name for partial words, -or to combine with --participant, --kind, or --state.`, +words in group chat titles, and skips chats without a title. Use tdc conversation +list --name for partial words, or --participant for chats without a title. Both +--name and --participant can be combined with --kind or --state. + +--type conversations can't be combined with --to, --channel, or --mention-me. +--author and --since/--until match the chat's creator and creation date.`, ) .action(search) } diff --git a/src/lib/skills/content.ts b/src/lib/skills/content.ts index b01b13a..1919db6 100644 --- a/src/lib/skills/content.ts +++ b/src/lib/skills/content.ts @@ -250,7 +250,9 @@ tdc search "query" --all # Fetch all result pages \`--since\` and \`--until\` filter by when the matching content was posted, not when a thread was last active, so a thread found by its title (\`--title-only\`) counts from when it was created. -To find a group chat by name, use \`tdc search "name" --type conversations\` first. It matches whole words in group chat titles. Use \`tdc conversation list --name\` for partial words, or to combine with \`--participant\`, \`--kind\`, or \`--state\`. +To find a group chat by name, use \`tdc search "name" --type conversations\` first. It matches whole words in group chat titles, and skips chats without a title. Use \`tdc conversation list --name\` for partial words, or \`--participant\` for chats without a title. Both \`--name\` and \`--participant\` can be combined with \`--kind\` or \`--state\`. + +\`--type conversations\` can't be combined with \`--to\`, \`--channel\`, or \`--mention-me\`. \`--author\` and \`--since\`/\`--until\` match the chat's creator and creation date. ## Users, Channels & Groups