| 1 | package wire |
| 2 | |
| 3 | // Thinking words: the phrases the thinking line shows while a turn runs, |
| 4 | // in a set each person picks (GET and PUT /api/v1/thinking). The words |
| 5 | // fill the gaps between tools; tool labels stay plain. The accessible |
| 6 | // label and tooltip keep the full activity. Sets are fixed here; |
| 7 | // their names and phrases are the instance's copy. |
| 8 | |
| 9 | // ThinkingSets are the sets, the default first; ThinkingRandom picks one |
| 10 | // of the others for each turn. |
| 11 | var ThinkingSets = []string{"professional", "playful", "galaxy", "bridge", "pirate", "terminal", ThinkingRandom} |
| 12 | |
| 13 | // DefaultThinking and ThinkingRandom are set ids. |
| 14 | const ( |
| 15 | DefaultThinking = "professional" |
| 16 | ThinkingRandom = "random" |
| 17 | ) |
| 18 | |
| 19 | // ThinkingSituations keeps the existing API phrase groups for older |
| 20 | // clients. Current conversation and Settings views use only "think". |
| 21 | var ThinkingSituations = []string{"think", "read", "search", "note", "handoff", "tool"} |
| 22 | |
| 23 | // ThinkingSet is one set: its name, a line about it, and its phrases by |
| 24 | // situation (empty for Random). |
| 25 | type ThinkingSet struct { |
| 26 | ID string `json:"id"` |
| 27 | Name string `json:"name"` |
| 28 | Description string `json:"description"` |
| 29 | Phrases map[string][]string `json:"phrases"` |
| 30 | } |
| 31 | |
| 32 | // ThinkingWords is GET /api/v1/thinking: the person's set and every set. |
| 33 | type ThinkingWords struct { |
| 34 | Set string `json:"set"` |
| 35 | Revision int64 `json:"revision"` |
| 36 | Sets []ThinkingSet `json:"sets"` |
| 37 | } |
| 38 | |
| 39 | // ThinkingChoice is the body of PUT /api/v1/thinking, and the data of |
| 40 | // the thinking event: the set, against the revision the person saw. |
| 41 | type ThinkingChoice struct { |
| 42 | Set string `json:"set"` |
| 43 | Revision int64 `json:"revision"` |
| 44 | } |
| 45 | |
| 46 | // EventThinking fires to the person when their set changes, so an open |
| 47 | // conversation uses it from the next turn. |
| 48 | const EventThinking = "thinking" |
| 49 | |