@tplog/pi-zendy 0.3.5 → 0.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +3 -2
  2. package/prompts/zme.md +52 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplog/pi-zendy",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
4
4
  "description": "Pi package for Dify Enterprise support ticket analysis",
5
5
  "repository": {
6
6
  "type": "git",
@@ -23,7 +23,8 @@
23
23
  },
24
24
  "files": [
25
25
  "dist",
26
- "extensions"
26
+ "extensions",
27
+ "prompts"
27
28
  ],
28
29
  "publishConfig": {
29
30
  "access": "public"
package/prompts/zme.md ADDED
@@ -0,0 +1,52 @@
1
+ ---
2
+ description: 查看当前 Zendesk 用户相关 tickets
3
+ argument-hint: "[filter]"
4
+ ---
5
+
6
+ 查看和当前 Zendesk 用户有关的 Zendesk tickets。
7
+
8
+ 用户附加要求:$ARGUMENTS
9
+
10
+ 请按下面流程执行:
11
+
12
+ 1. 先调用 `zendy_whoami`,确认当前 Zendesk 用户。
13
+ - 记下 `email`
14
+ - 记下 `name`
15
+ - 后续查询必须基于实际返回的身份,不要猜用户是谁。
16
+
17
+ 2. 查询 assigned 给当前用户的 tickets。
18
+ - 默认查询未完成 tickets:
19
+ `type:ticket assignee:<email> status<solved`
20
+ - 如果用户在参数里指定了时间、状态、关键词,请把它们合并进查询。
21
+ - 如果默认查询为 0,再放宽为:
22
+ `type:ticket assignee:<email>`
23
+
24
+ 3. 查询当前用户作为 follower / CC 的 tickets。
25
+ - 优先尝试:
26
+ `type:ticket follower:<email> status<solved`
27
+ - 如果结果为 0 或 Zendesk 不支持该语法,请明确说明,并尝试:
28
+ `type:ticket cc:<email> status<solved`
29
+ - 如果用户指定了过滤条件,同样合并进查询。
30
+
31
+ 4. 合并结果并去重。
32
+ - 同一个 ticket 同时出现在 assigned 和 follower/CC 时,放入 "Both"。
33
+ - 只 assigned 的放入 "Assigned to me"。
34
+ - 只 follower/CC 的放入 "Following / CC"。
35
+ - 不要重复列出同一个 ticket。
36
+
37
+ 5. 输出结果时使用简洁表格:
38
+ - ID
39
+ - Status
40
+ - Subject
41
+ - Created / Updated date,如果搜索结果里有
42
+ - Relation: Assigned / Following / Both
43
+
44
+ 6. 如果结果很多:
45
+ - 先显示最近或最相关的 20 条
46
+ - 说明总数
47
+ - 问用户是否要继续展开、按状态过滤、或逐个分析。
48
+
49
+ 7. 注意事项:
50
+ - 只使用 zendy 工具,不要使用 zcli、curl、Zendesk 外部 CLI。
51
+ - 不要臆测 Zendesk search syntax。某个查询不工作时,要说明是查询语法可能不支持,并给出实际 fallback。
52
+ - 如果用户要求分析某个 ticket,再调用 `zendy_ticket_get` 获取完整 ticket 和 comments。