Improved support to act on cards via ID
This commit is contained in:
@@ -128,6 +128,12 @@ class Command::Ai::Translator
|
||||
* **Past-tense** “tagged with #X”, “#X cards” → tag_ids: ["X"] (filter)
|
||||
* **Imperative** “tag …”, “tag with #X”, “add the #X tag”, “apply #X” → command /tag #X (never a filter)
|
||||
* When using past-tense verbs such as "assigned" or "closed", always use the corresponding filter, NEVER a command.
|
||||
* For command that acts on cards, you can reference those by their ID (number). Use the filter "card_ids" when the user passes numbers as command arguments.
|
||||
- User can reference with numbers to a single card or to a group of cards. E.g:
|
||||
- "close 123 and 456" → context: { card_ids: [123, 456] }, commands: [ "/close" ]
|
||||
- "assign 789 to jz" → context: { card_ids: [789] }, commands: [ "/assign jz" ]
|
||||
- "close 789" → context: { card_ids: [789] }, commands: [ "/close" ]
|
||||
- "assign 5, 82 and 9 to jz" → context: { card_ids: [5, 82 and 9] }, commands: [ "/assign jz" ]
|
||||
* "Unassigned cards" (or “not assigned”, “with no assignee”) → assignment_status: "unassigned".
|
||||
– IMPORTANT: Only set assignment_status when the user **explicitly** asks for an unassigned state
|
||||
– Do NOT infer unassigned just because an assignment follows.
|
||||
@@ -156,7 +162,6 @@ class Command::Ai::Translator
|
||||
* /visit <url|path> → open any other URL or internal path (cards, settings, etc.).
|
||||
* /do → engage with card and move it to "doing"
|
||||
* /consider → move card back to "considering" (reconsider)
|
||||
* When using infinitive verbs such as "assign" or "close", always use the corresponding command, NEVER a filter.
|
||||
* Unless a clear command applies, fallback to /search with the verbatim text.
|
||||
* When searching for nouns (non-person), prefer /search over terms.
|
||||
* When the person to pass to a command is "me" or "myself", use "#{user.to_gid}"
|
||||
@@ -192,6 +197,7 @@ class Command::Ai::Translator
|
||||
|
||||
---------------------------- CRUCIAL DON’TS ---------------------------
|
||||
|
||||
* When the query contains active verbs such as "assign" or "close", always use the corresponding command, NEVER a filter.
|
||||
* Don’t output “/visit /users/<name>”. Profile requests must use **/user <name>**.
|
||||
* Never use names, tags, or stage names mentioned **inside commands** (like /assign, /tag, /stage) as filters.
|
||||
* Never duplicate the assignee in both commands and context.
|
||||
@@ -229,6 +235,12 @@ class Command::Ai::Translator
|
||||
"context": { "assignee_ids": ["jz"] }
|
||||
}
|
||||
|
||||
User: assign to me
|
||||
Output:
|
||||
{
|
||||
"commands": ["/assign <GID of current user>"]
|
||||
}
|
||||
|
||||
User: tag with #design*
|
||||
Output:
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user