Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,14 @@ class TaskAssistantSettings {
- Questions expecting an answer: "What's the status of…?", "When will you…?"
- Assigned items: "@user", "assigned to you", review requests

CRITICAL FOR PUBLIC/GROUP CHANNELS:
In Discord, Slack, Teams, community chats, and other public/group channels, extract ONLY when the visible evidence shows the user is directly involved:
- The message explicitly @mentions the user by name or handle
- The user has already replied in the same thread and is an active participant
- The message is otherwise clearly addressed to the user by name, role, or visible thread context
If the user is merely observing a public channel, or if you cannot tell whether the request is directed at them, call no_task_found.
Do NOT extract tasks from broad bug reports, feature requests, or questions posted to the community at large.
Comment on lines +173 to +179
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Condition 2 is logically redundant within the section scope

The section header is CRITICAL FOR PUBLIC/GROUP CHANNELS, so a DM thread is already outside the scope this section addresses. Listing "It is a direct message (DM) thread, not a public or community channel" as one of the extraction-allowed conditions may confuse the model: it reads as if you need to first be in a public/group channel AND simultaneously be in a DM thread. In practice this condition belongs in the parent decision tree (before the section is even reached) rather than as a peer of the @mention and active-participant conditions. Removing or relocating it would reduce ambiguity, especially since an LLM reading the bullet list may treat the three items as an OR set whose second member contradicts the section heading.


WHO COUNTS AS "SOMEONE":
- A coworker in Slack, Teams, Discord, email
- A friend/family member in iMessage, WhatsApp, Telegram, Messenger
Expand Down
17 changes: 17 additions & 0 deletions desktop/Desktop/Tests/TaskAssistantPromptTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import XCTest
@testable import Omi_Computer

final class TaskAssistantPromptTests: XCTestCase {
@MainActor
func testDefaultPromptSkipsPublicChannelRequestsNotDirectedAtUser() {
let prompt = TaskAssistantSettings.defaultAnalysisPrompt

XCTAssertTrue(prompt.contains("CRITICAL FOR PUBLIC/GROUP CHANNELS"))
XCTAssertTrue(prompt.contains("visible evidence shows the user is directly involved"))
XCTAssertTrue(prompt.contains("merely observing a public channel"))
XCTAssertTrue(prompt.contains("cannot tell whether the request is directed at them"))
XCTAssertTrue(prompt.contains("otherwise clearly addressed to the user"))
XCTAssertTrue(prompt.contains("questions posted to the community at large"))
XCTAssertFalse(prompt.contains("It is a direct message (DM) thread, not a public or community channel"))
}
}
Loading