@bigbinary/neeto-assist-frontend 1.1.1 → 1.2.0
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.
- package/README.md +193 -41
- package/app/javascript/src/translations/en.json +6 -0
- package/dist/.ready +1 -1
- package/dist/NeetoAssistButton.js +3 -1
- package/dist/NeetoAssistButton.js.map +1 -1
- package/dist/NeetoAssistPane.js +586 -329
- package/dist/NeetoAssistPane.js.map +1 -1
- package/dist/cjs/NeetoAssistButton.js +3 -1
- package/dist/cjs/NeetoAssistButton.js.map +1 -1
- package/dist/cjs/NeetoAssistPane.js +575 -318
- package/dist/cjs/NeetoAssistPane.js.map +1 -1
- package/dist/cjs/index.js +3 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/{useNeetoAssistStore--JwP_Upt.js → useNeetoAssistStore-InICsbe8.js} +89 -6
- package/dist/useNeetoAssistStore-InICsbe8.js.map +1 -0
- package/dist/{useNeetoAssistStore-CGEUMbes.js → useNeetoAssistStore-VaZp3268.js} +91 -4
- package/dist/useNeetoAssistStore-VaZp3268.js.map +1 -0
- package/package.json +1 -1
- package/types.d.ts +31 -6
- package/dist/useNeetoAssistStore--JwP_Upt.js.map +0 -1
- package/dist/useNeetoAssistStore-CGEUMbes.js.map +0 -1
package/README.md
CHANGED
|
@@ -5,7 +5,8 @@ package. A host product, NeetoChat first, installs both to give its support reps
|
|
|
5
5
|
It shows what NeetoAssist would reply to a visitor, answers a rep's questions about the conversation, looks things up
|
|
6
6
|
in the host as that rep while it answers, and suggests actions such as assigning the conversation, which run only
|
|
7
7
|
when a rep clicks. NeetoAssist never writes into the conversation by itself and never talks to the visitor: a rep
|
|
8
|
-
decides what to send and what to do.
|
|
8
|
+
decides what to send and what to do. It also suggests actions of its own, in systems a workspace has connected to
|
|
9
|
+
it, such as saving a help article draft in NeetoKB. Those need nothing from a host and run only on a click too.
|
|
9
10
|
|
|
10
11
|
The engine calls NeetoAssist's product API (`https://{subdomain}.neetoassist.com`) for the workspace the rep works
|
|
11
12
|
in and passes NeetoAssist's answers through to the pane. It also answers NeetoAssist's own servers when they look
|
|
@@ -76,6 +77,9 @@ NeetoAssistEngine.configure do |config|
|
|
|
76
77
|
# Optional, in seconds. These are the defaults.
|
|
77
78
|
config.open_timeout = 2
|
|
78
79
|
config.read_timeout = 10
|
|
80
|
+
# Optional, in seconds. How long a click on one of NeetoAssist's own actions
|
|
81
|
+
# waits for NeetoAssist to run it. This is the default.
|
|
82
|
+
config.own_action_read_timeout = 20
|
|
79
83
|
# Optional. How long NeetoAssist may look things up as the rep who asked.
|
|
80
84
|
# 15 minutes is the default and the most: a host can only shorten it.
|
|
81
85
|
config.grant_ttl = 15.minutes
|
|
@@ -87,8 +91,13 @@ nothing, the status endpoint answers `{ "enabled": false }`, the conversation en
|
|
|
87
91
|
endpoints answer 401.
|
|
88
92
|
|
|
89
93
|
After a call times out or cannot connect, the engine's calls fail at once for 30 seconds, so a NeetoAssist that stops
|
|
90
|
-
answering cannot tie up the host's threads. The cool off is kept in `Rails.cache`.
|
|
91
|
-
the report on how an action a rep applied
|
|
94
|
+
answering cannot tie up the host's threads. The cool off is kept in `Rails.cache`. Two calls are sent all the same,
|
|
95
|
+
and both only ever follow a claim NeetoAssist answered a moment before: the report on how an action a rep applied
|
|
96
|
+
ended, which NeetoAssist has to hear, and the click on one of
|
|
97
|
+
[NeetoAssist's own actions](#neetoassists-own-actions). That click waits `own_action_read_timeout` for its answer,
|
|
98
|
+
since NeetoAssist writes to another system meanwhile, and when no answer comes it starts no cool off. Keep
|
|
99
|
+
`own_action_read_timeout` inside the time the host gives a request, which rack-timeout sets to 30 seconds in a Neeto
|
|
100
|
+
product.
|
|
92
101
|
|
|
93
102
|
### Host adapter
|
|
94
103
|
|
|
@@ -287,7 +296,7 @@ NeetoAssist offers it to the model as `suggest_<name>` and a model takes a name
|
|
|
287
296
|
never the model's account of it. Raise `InvalidArguments` when it cannot be done, in words NeetoAssist can act
|
|
288
297
|
on. It only reads. The engine calls it when NeetoAssist suggests the action and again right before the action
|
|
289
298
|
runs, since things change between a suggestion and a click. The action runs only if `preview` then still
|
|
290
|
-
returns the title and the
|
|
299
|
+
returns the title, the details and the content the card was made from (rule 4).
|
|
291
300
|
- `call` makes the change as `user`, the rep who clicked, and returns a sentence that says what was done. Raise
|
|
292
301
|
`Failed` with a sentence when it could not be done.
|
|
293
302
|
|
|
@@ -300,13 +309,97 @@ Four rules here too:
|
|
|
300
309
|
2. **Nothing an action does may reach the customer.** NeetoAssist must not put anything in front of a customer, so
|
|
301
310
|
leave out whatever sends a message or an email, or changes what the customer sees.
|
|
302
311
|
3. **Refuse in `preview` what `call` would refuse.** A rep should not get a card for something that cannot be done.
|
|
303
|
-
4. **Keep what changes by itself out of a card's words.** A card runs only if `preview` still returns the title
|
|
304
|
-
the details it returned when the card was made. If
|
|
305
|
-
card says so, since the rep agreed to the words on the card and not to what the same
|
|
306
|
-
name in them what will change and for whom ("Unassign Priya Sharma", not
|
|
307
|
-
day, a running count, or anything else that differs from one call to the
|
|
308
|
-
NeetoAssist's servers and once in the rep's own request, and has to give the same
|
|
309
|
-
lean on what only a signed-in request sets, such as the rep's time zone, and list
|
|
312
|
+
4. **Keep what changes by itself out of a card's words.** A card runs only if `preview` still returns the title,
|
|
313
|
+
the details and the content it returned when the card was made. If any of them reads differently at the click,
|
|
314
|
+
nothing runs and the card says so, since the rep agreed to the words on the card and not to what the same
|
|
315
|
+
arguments mean by now. So name in them what will change and for whom ("Unassign Priya Sharma", not
|
|
316
|
+
"Unassign"), and leave out the time of day, a running count, or anything else that differs from one call to the
|
|
317
|
+
next. `preview` runs once for NeetoAssist's servers and once in the rep's own request, and has to give the same
|
|
318
|
+
words both times, so do not lean on what only a signed-in request sets, such as the rep's time zone, and list
|
|
319
|
+
things in a fixed order.
|
|
320
|
+
|
|
321
|
+
#### An action that writes text, or leaves something to open
|
|
322
|
+
|
|
323
|
+
```ruby
|
|
324
|
+
module NeetoAssist
|
|
325
|
+
module Actions
|
|
326
|
+
class CreateGithubIssue < NeetoAssistEngine::Action
|
|
327
|
+
description "Creates an issue in the workspace's GitHub repository."
|
|
328
|
+
label "Create GitHub issue"
|
|
329
|
+
param :title, :string, max_length: 256, description: "The issue's title."
|
|
330
|
+
param :body, :string, max_length: 8_000, description: "What is wrong and how to see it, in GitHub markdown."
|
|
331
|
+
writes :github_issue, :title, :body
|
|
332
|
+
|
|
333
|
+
def preview(title:, body:)
|
|
334
|
+
Preview.new(title: "Create a GitHub issue in #{repository.name}", details: ["Title: #{title}"], content: body)
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
def call(title:, body:)
|
|
338
|
+
issue = Github::IssueService.new(conversation, title:, body:, performer: user).process
|
|
339
|
+
Done.new(
|
|
340
|
+
"Created issue ##{issue.number} in #{repository.name}.", link_label: "Open the issue",
|
|
341
|
+
link_url: issue.url)
|
|
342
|
+
end
|
|
343
|
+
end
|
|
344
|
+
end
|
|
345
|
+
end
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
Three things are for an action like this one. Each is optional, and an action that uses none of them works as
|
|
349
|
+
before.
|
|
350
|
+
|
|
351
|
+
- `writes kind, *fields` says which of the action's params are text written for people, and what kind of text it
|
|
352
|
+
is. A workspace can tell NeetoAssist, in NeetoAssist's settings, how it wants a kind of text written: its GitHub
|
|
353
|
+
issues, its help articles, its feature requests. NeetoAssist then writes these params that way before it asks for
|
|
354
|
+
the card, and a kind it has no guide for changes nothing. The kind is a name like `github_issue`: a lower case
|
|
355
|
+
letter, then letters, digits and underscores, 2 to 31 characters in all. The fields are one to five of the
|
|
356
|
+
action's own `:string` params. A subclass writes what its parent writes, unless it calls `writes` itself.
|
|
357
|
+
- A `Preview` takes a `content`: the long text the action will save or send, such as the body of the issue, in plain
|
|
358
|
+
text or in the light markdown the pane shows (paragraphs, `**bold**`, lists, `##` headings). At most 20,000
|
|
359
|
+
characters. The card shows all of it in a box under the details, since a rep reads it before clicking, and it is
|
|
360
|
+
part of what the card says: a click runs only if `preview` still returns the same content. Leave it out for an
|
|
361
|
+
action that writes nothing long.
|
|
362
|
+
- `call` can return a `Done` in place of a sentence, when it made something a rep can open:
|
|
363
|
+
`Done.new(sentence, link_label:, link_url:)`. The card then shows the link under the sentence. NeetoAssist keeps
|
|
364
|
+
a link with a label of 1 to 60 characters and an `http` or `https` address of at most 2,000. A link that is
|
|
365
|
+
anything else is left out and reported to Honeybadger, and the action is applied all the same, since by then it
|
|
366
|
+
has run.
|
|
367
|
+
|
|
368
|
+
#### A command for an action
|
|
369
|
+
|
|
370
|
+
A rep who types `/` in NeetoAssist's box is shown what they can ask for by name: the commands. NeetoAssist has
|
|
371
|
+
commands of its own for its own actions (`/fr` for a feature request, `/kb` for a help article draft), and an action
|
|
372
|
+
of the host's can name one:
|
|
373
|
+
|
|
374
|
+
```ruby
|
|
375
|
+
module NeetoAssist
|
|
376
|
+
module Actions
|
|
377
|
+
class CreateGithubIssue < NeetoAssistEngine::Action
|
|
378
|
+
command "gh", title: "Create a GitHub issue",
|
|
379
|
+
description: "File an issue in your connected repository from this conversation."
|
|
380
|
+
end
|
|
381
|
+
end
|
|
382
|
+
end
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
- The rep picks `/gh` in the menu, may add a few words (`/gh only the export part`) and sends. NeetoAssist then
|
|
386
|
+
works towards exactly this action and ends in its card, which runs only when the rep clicks "Apply", as every
|
|
387
|
+
card does. Plain words go on working: "file a GitHub issue for this" needs no command.
|
|
388
|
+
- The menu shows the name, the title and the description. The name is a lower case letter, then lower case
|
|
389
|
+
letters, digits and hyphens, at most 20 characters. The title is 1 to 60 characters and the description 1 to 160,
|
|
390
|
+
one line each.
|
|
391
|
+
- The title and the description can each be something that responds to `call`, such as
|
|
392
|
+
`title: -> { I18n.t("neeto_assist.actions.create_github_issue.command.title") }`. It is read whenever the action
|
|
393
|
+
is described, in the rep's own request, so it comes out in the language of the rep's screen, as a `label` block
|
|
394
|
+
does.
|
|
395
|
+
- A subclass has its parent's command, unless it names its own. Several actions can name the same command, which
|
|
396
|
+
then stands for all of them, and the menu lists it once.
|
|
397
|
+
- `fr` and `kb` are NeetoAssist's own. An action of the host's that names one of them stays, and NeetoAssist drops
|
|
398
|
+
its command.
|
|
399
|
+
- The pane fetches the commands with the list of runs, as often as every two seconds. For that list the engine
|
|
400
|
+
builds the host's tools and actions the way it does for a question, so that the menu lists exactly the commands
|
|
401
|
+
a question can use, and asks each of them `available?`, whether or not it names a command. So keep every
|
|
402
|
+
`available?` cheap: no call to another service, and as few queries as it can do with.
|
|
310
403
|
|
|
311
404
|
#### What the engine does with them
|
|
312
405
|
|
|
@@ -321,11 +414,35 @@ Four rules here too:
|
|
|
321
414
|
- a label that is not a text of at most 120 characters;
|
|
322
415
|
- params over 4,000 bytes as JSON;
|
|
323
416
|
- being the 25th tool or the 25th action;
|
|
324
|
-
- for an action: a name over 56 characters, or a param called `reason
|
|
417
|
+
- for an action: a name over 56 characters, or a param called `reason`;
|
|
418
|
+
- for an action that `writes`: a kind whose name is not like `github_issue`, no field or more than five, or a
|
|
419
|
+
field that is not one of the action's own `:string` params;
|
|
420
|
+
- for an action that names a `command`: a name that is not like `gh`, or a title or a description that is blank
|
|
421
|
+
or too long.
|
|
422
|
+
- A `preview` without a title, or with a content over 20,000 characters, is the host's mistake too: NeetoAssist
|
|
423
|
+
is told nothing, no card is made, and the error goes to Honeybadger.
|
|
325
424
|
- An `Action` listed among `tools` is left out: nothing that changes the host is ever run as a lookup.
|
|
326
425
|
- When NeetoAssist calls a tool or a rep clicks a card, the engine finds the class by name among the same list, for
|
|
327
426
|
the rep it is acting for, and asks `available?` again.
|
|
328
427
|
|
|
428
|
+
#### NeetoAssist's own actions
|
|
429
|
+
|
|
430
|
+
NeetoAssist has actions of its own, in the systems a workspace connects to it in NeetoAssist's settings: filing or
|
|
431
|
+
upvoting a feature request in NeetoEngage, saving a help article draft in NeetoKB. They need nothing from a host:
|
|
432
|
+
no class, no adapter method and no setup.
|
|
433
|
+
|
|
434
|
+
- With every question the engine tells NeetoAssist that it can pass a click on one of them back
|
|
435
|
+
(`capabilities.own_actions`), whether or not the host has tools or actions of its own. NeetoAssist offers its own
|
|
436
|
+
actions only to an engine that says so.
|
|
437
|
+
- Their cards look and work like any other card. When a rep clicks "Apply", the engine claims the action as it
|
|
438
|
+
claims a host's, and NeetoAssist's answer says who runs it. For one of its own, the engine asks NeetoAssist to
|
|
439
|
+
run it for that rep, waits `config.own_action_read_timeout`, and passes the answer to the pane.
|
|
440
|
+
- The host runs nothing for such a click and reports nothing. Its catalog is not even looked at, so an action of the
|
|
441
|
+
host's that happens to have the same name is never run in its place.
|
|
442
|
+
- NeetoAssist makes the change with the workspace's own connection and ends the action itself. If the engine gets
|
|
443
|
+
no answer in time, the rep is told that NeetoAssist cannot be reached, and the card says what became of the
|
|
444
|
+
action once NeetoAssist knows.
|
|
445
|
+
|
|
329
446
|
### The grant, and what a host trusts
|
|
330
447
|
|
|
331
448
|
NeetoAssist's servers are not signed in to the host. What lets them look something up is a grant.
|
|
@@ -355,8 +472,10 @@ What a host is trusting when it installs the engine:
|
|
|
355
472
|
grant. With both it can call the tools the host wrote, for 15 minutes after a rep asked, as that rep, on the
|
|
356
473
|
conversation that rep asked about. What it can read is what those tools return, so a tool is as careful as its
|
|
357
474
|
queries.
|
|
358
|
-
- **NeetoAssist cannot change anything.** The two server endpoints only read, with writes to the
|
|
359
|
-
An action runs only from a rep's click, in the host's own session, after `available?` said that
|
|
475
|
+
- **NeetoAssist cannot change anything in the host.** The two server endpoints only read, with writes to the
|
|
476
|
+
database refused. An action runs only from a rep's click, in the host's own session, after `available?` said that
|
|
477
|
+
rep may. NeetoAssist's own actions change the systems a workspace connected to NeetoAssist, never the host, and
|
|
478
|
+
they too run only when a rep clicks.
|
|
360
479
|
- **The product token is the secret to guard.** Whoever holds it and a grant can read as that rep. A grant alone
|
|
361
480
|
opens nothing, and neither does the token alone. NeetoAssist keeps a grant encrypted and erases it when it has
|
|
362
481
|
answered.
|
|
@@ -377,12 +496,12 @@ NeetoAssist (`conversation_external_id`) needs nothing extra.
|
|
|
377
496
|
|
|
378
497
|
#### The language of a lookup and a card
|
|
379
498
|
|
|
380
|
-
A lookup's `summary` and a card's `title` and `
|
|
381
|
-
screen and no language of their own. So the grant carries the language the host had set for the rep's
|
|
382
|
-
they asked (`I18n.locale`), and the engine runs a call from NeetoAssist's servers inside
|
|
383
|
-
it. A language that is not among the host's `I18n.available_locales` means the host's
|
|
384
|
-
and `preview`, use `I18n.t` as on any of the host's screens. A `label` is read when the
|
|
385
|
-
request, so a `label` block is translated too.
|
|
499
|
+
A lookup's `summary` and a card's `title`, `details` and `content` are read by the rep, and NeetoAssist's servers
|
|
500
|
+
have no screen and no language of their own. So the grant carries the language the host had set for the rep's
|
|
501
|
+
request when they asked (`I18n.locale`), and the engine runs a call from NeetoAssist's servers inside
|
|
502
|
+
`I18n.with_locale` with it. A language that is not among the host's `I18n.available_locales` means the host's
|
|
503
|
+
default one. In `summary` and `preview`, use `I18n.t` as on any of the host's screens. A `label` is read when the
|
|
504
|
+
rep asks, in the rep's own request, so a `label` block is translated too.
|
|
386
505
|
|
|
387
506
|
A click on a card is the rep's own request, so `preview` then runs in the language the host has set for that
|
|
388
507
|
request. For a rep who has not changed their language since they asked, that is the card's language, and the words
|
|
@@ -396,10 +515,10 @@ The pane calls these for the signed-in rep, under the mount path:
|
|
|
396
515
|
| Endpoint | Does |
|
|
397
516
|
| --- | --- |
|
|
398
517
|
| `GET /neeto_assist/api/v1/status` | `200 { "enabled": true }` or `{ "enabled": false }`, for any signed-in rep. |
|
|
399
|
-
| `GET /neeto_assist/api/v1/conversations/:conversation_id/runs` | NeetoAssist's runs for the conversation as the signed-in rep may see them, newest first: every reply suggestion, and the rep's own questions, each with the lookups it made (`steps`) and the actions it suggested (`actions`). Another rep's questions are not among them. With them come the workspace's credits: `{ "runs": [...], "credits": { "exhausted", "remaining", "buy_url" } }`. `buy_url` is `null` unless `can_buy_credits?` is true for the rep. |
|
|
518
|
+
| `GET /neeto_assist/api/v1/conversations/:conversation_id/runs` | NeetoAssist's runs for the conversation as the signed-in rep may see them, newest first: every reply suggestion, and the rep's own questions, each with the lookups it made (`steps`) and the actions it suggested (`actions`). Another rep's questions are not among them. With them come the workspace's credits and the commands the rep can pick in the box: `{ "runs": [...], "credits": { "exhausted", "remaining", "buy_url" }, "commands": [{ "name", "title", "description" }] }`. `buy_url` is `null` unless `can_buy_credits?` is true for the rep. |
|
|
400
519
|
| `POST /neeto_assist/api/v1/conversations/:conversation_id/runs` | Asks NeetoAssist the rep's question: `{ "run": { "question": "..." } }`. The engine adds the rep's role, the tools and actions the rep may use, a grant and the `context`. |
|
|
401
520
|
| `PUT /neeto_assist/api/v1/conversations/:conversation_id/runs/:run_id/feedback` | Rates a run: `{ "feedback": { "rating": "up", "note": "..." } }`. |
|
|
402
|
-
| `POST /neeto_assist/api/v1/conversations/:conversation_id/actions/:id/apply` | Runs a suggested action as the signed-in rep. |
|
|
521
|
+
| `POST /neeto_assist/api/v1/conversations/:conversation_id/actions/:id/apply` | Runs a suggested action as the signed-in rep, or has NeetoAssist run one of its own for that rep. |
|
|
403
522
|
| `POST /neeto_assist/api/v1/conversations/:conversation_id/actions/:id/dismiss` | Dismisses a suggested action. |
|
|
404
523
|
|
|
405
524
|
- The conversation endpoints answer 404 unless `enabled?`, `find_conversation` and `can_use?` all pass.
|
|
@@ -408,6 +527,11 @@ The pane calls these for the signed-in rep, under the mount path:
|
|
|
408
527
|
- An answer to a question is built from lookups made with the asker's access, so only the rep who asked is shown
|
|
409
528
|
it. The engine tells NeetoAssist who is looking with every list (`requested_by_id`, the signed-in rep's id as
|
|
410
529
|
it was sent when they asked), and NeetoAssist leaves out the questions of everyone else.
|
|
530
|
+
- The `commands` of the list are NeetoAssist's own, as it lists them for the workspace, then those of the host's
|
|
531
|
+
actions this rep is offered on this conversation, each name once. NeetoAssist's own come first and keep a name
|
|
532
|
+
the host names too. Only a name, a title and a description of the right shape reach the browser. A NeetoAssist
|
|
533
|
+
from before it had commands lists none, and the rep then gets the host's alone. If the host's part cannot be
|
|
534
|
+
built, the rep still gets the runs and NeetoAssist's commands, and the error goes to Honeybadger.
|
|
411
535
|
- A blank question, one over 2,000 characters, or a rating other than `up` or `down` is
|
|
412
536
|
`422 { "error": "invalid", "details": { ... } }`, without calling NeetoAssist.
|
|
413
537
|
- NeetoAssist being down, slow, answering with a 5xx, or refusing the product token is
|
|
@@ -415,27 +539,34 @@ The pane calls these for the signed-in rep, under the mount path:
|
|
|
415
539
|
host.
|
|
416
540
|
- Any other answer from NeetoAssist passes through with its status and body, such as `404 not_found`,
|
|
417
541
|
`409 disabled` or `422 invalid`.
|
|
418
|
-
- A suggested action's `arguments` never reach the browser. The card shows the host's own `title` and
|
|
542
|
+
- A suggested action's `arguments` never reach the browser. The card shows the host's own `title`, `details` and
|
|
543
|
+
`content`.
|
|
419
544
|
|
|
420
545
|
Applying an action takes these steps:
|
|
421
546
|
|
|
422
547
|
1. The engine claims the action at NeetoAssist, so two clicks cannot both run it. A refusal passes through, such as
|
|
423
548
|
`409 not_suggested` for an action that was applied or dismissed already, or `409 expired`.
|
|
424
|
-
2.
|
|
549
|
+
2. NeetoAssist's answer says who runs the action. One of [its own](#neetoassists-own-actions) is run by
|
|
550
|
+
NeetoAssist: the engine asks it to, and its answer passes through to the pane, as `200 { "action": { ... } }`,
|
|
551
|
+
as `422 { "error": "failed", "message": "...", "action": { ... } }`, or as a refusal. The steps below are for
|
|
552
|
+
the host's actions only.
|
|
553
|
+
3. It finds the action among `actions(current_user, conversation)` and asks `available?`. A rep who may not do it
|
|
425
554
|
gets `403 { "error": "forbidden" }`, and the action goes back to being a suggestion, since nothing ran.
|
|
426
|
-
|
|
427
|
-
same, nothing runs and the action fails with "This has changed since it was suggested, so nothing was
|
|
428
|
-
NeetoAssist again." A card with no details matches a preview with none
|
|
429
|
-
|
|
555
|
+
4. It calls `preview` again and compares the title, the details and the content with the card's. When they are no
|
|
556
|
+
longer the same, nothing runs and the action fails with "This has changed since it was suggested, so nothing was
|
|
557
|
+
done. Ask NeetoAssist again." A card with no details matches a preview with none, and so does a card with no
|
|
558
|
+
content. Otherwise it calls `call`.
|
|
559
|
+
5. The answer is `200 { "action": { ... } }` with the action as applied. When the action refused or broke, it is
|
|
430
560
|
`422 { "error": "failed", "message": "...", "action": { ... } }`. The message is the action's own sentence, or
|
|
431
561
|
"Something went wrong." for an error nobody expected, which goes to Honeybadger.
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
never
|
|
437
|
-
|
|
438
|
-
|
|
562
|
+
6. NeetoAssist is told how it ended, with the link the action ended with when `call` returned a `Done`. If that
|
|
563
|
+
report does not get through, the rep is still told what happened in the host, and
|
|
564
|
+
`NeetoAssistEngine::ReportActionJob` sends the same report again from the `within_5_seconds` queue, with five
|
|
565
|
+
retries over seven to nine and a half minutes. It carries ids, the host's sentence, the link and who clicked,
|
|
566
|
+
never the action's arguments. Until NeetoAssist hears, it shows the action as being applied. If it never does,
|
|
567
|
+
it marks the action after ten minutes as one nobody could confirm. Every report names the claim it is for
|
|
568
|
+
(`claim`, as NeetoAssist answered the claim), so a report that arrives after the rep clicked once more is not
|
|
569
|
+
taken for the new click's.
|
|
439
570
|
|
|
440
571
|
NeetoAssist's own servers call the next two, with `Authorization: Bearer <product token>` and
|
|
441
572
|
`X-Neeto-Assist-Grant: <grant>`:
|
|
@@ -443,7 +574,7 @@ NeetoAssist's own servers call the next two, with `Authorization: Bearer <produc
|
|
|
443
574
|
| Endpoint | Body | Answer |
|
|
444
575
|
| --- | --- | --- |
|
|
445
576
|
| `POST /neeto_assist/api/v1/server/tool_calls` | `{ "tool": "list_teammates", "arguments": { ... }, "run_id": "..." }` | `200 { "result": ..., "summary": "3 people" }`. `summary` is `null` when the tool has none. |
|
|
446
|
-
| `POST /neeto_assist/api/v1/server/action_previews` | `{ "name": "assign_conversation", "arguments": { ... }, "run_id": "..." }` | `200 { "preview": { "title": "Assign to Priya Sharma", "details": ["Team: Billing"] } }` |
|
|
577
|
+
| `POST /neeto_assist/api/v1/server/action_previews` | `{ "name": "assign_conversation", "arguments": { ... }, "run_id": "..." }` | `200 { "preview": { "title": "Assign to Priya Sharma", "details": ["Team: Billing"] } }`. The preview has a `content` too when the action's `Preview` has one. |
|
|
447
578
|
|
|
448
579
|
Both only read, and neither looks at a session or a cookie. Their errors are
|
|
449
580
|
`{ "error": "<code>", "message": "<a sentence, for some>" }`:
|
|
@@ -534,6 +665,16 @@ const TicketHeader = ({
|
|
|
534
665
|
questions. It polls every 2 seconds while NeetoAssist is working on a run and every 30 seconds otherwise, and
|
|
535
666
|
shows its errors inside the pane, never as a toast or an error page. A card that is being applied does not speed
|
|
536
667
|
the polling up: the rep who clicked reads what became of it from the answer to the click.
|
|
668
|
+
- The box takes commands. A `/` as the first character opens a menu right above the box, with what this rep can ask
|
|
669
|
+
for by name: each row is the command (`/fr`), its title, and its description in muted text. Typing on narrows
|
|
670
|
+
the menu, by the name and by the words of the title. The arrow keys move the mark, Enter or Tab picks the marked
|
|
671
|
+
command and Escape closes the menu. A click picks too. While the menu is open Enter picks and does not send.
|
|
672
|
+
Picking writes the command and a space into the box (`/fr `) and leaves the cursor after it, so the rep adds a
|
|
673
|
+
few words or sends it as it is. The menu closes at the space after a full name, and there is none when nothing
|
|
674
|
+
fits. While the box is empty, "Type / for commands" stands in the place of the character count. A workspace
|
|
675
|
+
without commands gets no menu and no such line, and the box is the plain one it always was.
|
|
676
|
+
- A question that NeetoAssist read as a command shows as it was typed, with the command a little heavier than the
|
|
677
|
+
words after it.
|
|
537
678
|
- What NeetoAssist looked up shows as a quiet list while it works: each lookup's label with a spinner, a check or a
|
|
538
679
|
cross, and a few words on what it found. Once the answer is there the list folds into one line, such as "Looked at 3
|
|
539
680
|
things", that opens to the same list.
|
|
@@ -544,14 +685,25 @@ const TicketHeader = ({
|
|
|
544
685
|
done and who applied it. A card that failed says why and has no retry: the rep can ask again. A dismissed or expired
|
|
545
686
|
card steps back to a muted line, and a dismissed one says who dismissed it. A card never shows the action's
|
|
546
687
|
arguments or an id, and everything on it is shown as text, never as HTML.
|
|
688
|
+
- A card for an action that saves or sends a long text, such as the body of an issue or a help article, shows that
|
|
689
|
+
text too: the `content`, under the details and above the reason, as light markdown in a box about twelve lines tall
|
|
690
|
+
that scrolls. When the text is taller than the box, "Show all" under it opens the box all the way and "Show less"
|
|
691
|
+
folds it again. The rep reads what will be written before clicking "Apply". The muted line of a dismissed or
|
|
692
|
+
expired card leaves the content out.
|
|
693
|
+
- An applied card whose action ended with a link, such as "Open the issue", shows it under the sentence on what was
|
|
694
|
+
done. It opens in a new tab. Only an `http` or `https` address becomes a link, and its label is shown as text.
|
|
695
|
+
- A card for one of [NeetoAssist's own actions](#neetoassists-own-actions) looks and works the same. Its words are
|
|
696
|
+
written by NeetoAssist's code, and NeetoAssist makes the change when the rep clicks "Apply".
|
|
547
697
|
- `onActionApplied(action)` is called once after "Apply" worked. The change was made on the server by the host's own
|
|
548
698
|
code, so the page still shows what was there before: fetch the conversation again (with React Query, invalidate its
|
|
549
699
|
queries), or whatever `action.name` says was changed, so the rep sees it without a reload. `action` is the applied
|
|
550
|
-
action with `id`, `name`, `title`, `details`, `
|
|
551
|
-
and never its arguments. It is not called for an action that failed or was
|
|
552
|
-
rep has opened another conversation before the answer to the click arrived.
|
|
553
|
-
the host last gave for the conversation the action was applied on, so let a
|
|
554
|
-
was given for, which need not be the one on screen any more.
|
|
700
|
+
action with `id`, `name`, `title`, `details`, `content`, `reason`, `runner`, `status`, `result`, `link`,
|
|
701
|
+
`actedBy`, `actedAt` and `expiresAt`, and never its arguments. It is not called for an action that failed or was
|
|
702
|
+
dismissed. It is called even when the rep has opened another conversation before the answer to the click arrived.
|
|
703
|
+
The handler called is then the one the host last gave for the conversation the action was applied on, so let a
|
|
704
|
+
handler refresh the conversation it was given for, which need not be the one on screen any more. It is called for
|
|
705
|
+
one of NeetoAssist's own actions too, which changed nothing in the host: `action.runner` is then `neeto_assist`,
|
|
706
|
+
and `action.name` is none of the host's.
|
|
555
707
|
- `onUseReply(text, html)` is called when the rep clicks "Use reply". Put the reply in the composer and send
|
|
556
708
|
nothing. `text` is the reply as NeetoAssist wrote it, in light markdown (paragraphs split by blank lines,
|
|
557
709
|
`**bold**`, `1.` numbered and `-` bulleted lists, `##` headings). `html` is the same reply for a rich-text
|
|
@@ -49,6 +49,8 @@
|
|
|
49
49
|
"failed": "This could not be done.",
|
|
50
50
|
"dismissed": "Dismissed",
|
|
51
51
|
"expired": "Expired",
|
|
52
|
+
"showAll": "Show all",
|
|
53
|
+
"showLess": "Show less",
|
|
52
54
|
"errors": {
|
|
53
55
|
"forbidden": "You don't have permission to do this. Ask an admin.",
|
|
54
56
|
"unavailable": "NeetoAssist cannot be reached right now. Try again shortly."
|
|
@@ -86,6 +88,10 @@
|
|
|
86
88
|
"placeholder": "Ask anything, or say what you need done",
|
|
87
89
|
"submit": "Send to NeetoAssist"
|
|
88
90
|
},
|
|
91
|
+
"commands": {
|
|
92
|
+
"hint": "Type / for commands",
|
|
93
|
+
"label": "Commands"
|
|
94
|
+
},
|
|
89
95
|
"errors": {
|
|
90
96
|
"unavailable": "NeetoAssist cannot be reached right now. It will try again shortly.",
|
|
91
97
|
"disabled": "NeetoAssist is switched off for this workspace.",
|
package/dist/.ready
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Built at 2026-11-
|
|
1
|
+
Built at 2026-11-12T16:27:11.311Z
|
|
@@ -2,13 +2,15 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
|
2
2
|
import { useRef, useEffect } from 'react';
|
|
3
3
|
import { Button } from '@bigbinary/neeto-atoms';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
|
-
import { u as useNeetoAssistStore, a as useFetchRuns, l as latestDraftId, S as Sparkle } from './useNeetoAssistStore
|
|
5
|
+
import { u as useNeetoAssistStore, a as useFetchRuns, l as latestDraftId, S as Sparkle } from './useNeetoAssistStore-InICsbe8.js';
|
|
6
6
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
7
7
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
8
8
|
import '@tanstack/react-query';
|
|
9
9
|
import '@bigbinary/neeto-commons-frontend/v2/react-utils';
|
|
10
10
|
import './neeto_assist-CpUBA-3Z.js';
|
|
11
11
|
import 'axios';
|
|
12
|
+
import '@babel/runtime/helpers/toConsumableArray';
|
|
13
|
+
import '@babel/runtime/helpers/toArray';
|
|
12
14
|
import 'ramda';
|
|
13
15
|
import '@bigbinary/neeto-commons-frontend/v2/utils';
|
|
14
16
|
import 'zustand';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeetoAssistButton.js","sources":["../app/javascript/src/components/NeetoAssistButton/index.jsx"],"sourcesContent":["import { useEffect, useRef } from \"react\";\n\nimport { Button } from \"neetoatoms\";\nimport { useTranslation } from \"react-i18next\";\n\nimport Sparkle from \"components/commons/Sparkle\";\nimport { useFetchRuns } from \"hooks/reactQuery/useRunsApi\";\nimport useNeetoAssistStore from \"stores/useNeetoAssistStore\";\nimport { latestDraftId } from \"utils/runs\";\n\nconst NeetoAssistIcon = props => (\n <Sparkle {...props} className=\"text-purple-600\" />\n);\n\n// Goes on the ticket: it opens the pane, and tells the pane which ticket it is\n// about for as long as the button is on screen, along with the host's words\n// for what the rep is looking at. A dot says a suggested reply is waiting,\n// since the pane is closed until the rep asks for it.\nconst NeetoAssistButton = ({\n conversationId,\n contextLabel,\n onActionApplied,\n onUseReply,\n}) => {\n const { t } = useTranslation();\n const isOpen = useNeetoAssistStore(state => state.isOpen);\n const toggle = useNeetoAssistStore(state => state.toggle);\n const setConversation = useNeetoAssistStore(state => state.setConversation);\n const clearConversation = useNeetoAssistStore(\n state => state.clearConversation\n );\n\n const seenDraftId = useNeetoAssistStore(\n state => state.seenDrafts[conversationId]\n );\n\n const { data: { runs = [] } = {} } = useFetchRuns(conversationId);\n const draftId = latestDraftId(runs);\n const hasUnseenDraft = !isOpen && !!draftId && draftId !== seenDraftId;\n\n // The host's handlers change on every render. Only whether there is one for\n // \"Use reply\" matters to the pane, and one for an applied action changes\n // nothing it shows, so the pane gets stand-ins that call the latest.\n const useReplyRef = useRef(onUseReply);\n const actionAppliedRef = useRef(onActionApplied);\n const canUseReply = !!onUseReply;\n useEffect(() => {\n useReplyRef.current = onUseReply;\n actionAppliedRef.current = onActionApplied;\n });\n\n useEffect(() => {\n // The answer to a click on Apply can arrive after the button has moved on\n // to another ticket. It then goes to the handler the host last gave for\n // this ticket, not to the one for the ticket now on screen.\n let handlerOnLeaving;\n let hasLeft = false;\n\n setConversation({\n id: conversationId,\n contextLabel,\n onUseReply: canUseReply\n ? (text, html) => useReplyRef.current?.(text, html)\n : undefined,\n onActionApplied: action =>\n (hasLeft ? handlerOnLeaving : actionAppliedRef.current)?.(action),\n });\n\n return () => {\n handlerOnLeaving = actionAppliedRef.current;\n hasLeft = true;\n clearConversation(conversationId);\n };\n }, [\n canUseReply,\n clearConversation,\n contextLabel,\n conversationId,\n setConversation,\n ]);\n\n return (\n <span className=\"relative inline-flex\">\n <Button\n aria-pressed={isOpen}\n data-testid=\"neeto-assist-button\"\n icon={NeetoAssistIcon}\n iconPosition=\"left\"\n label={t(\"neetoAssist.askButton\")}\n size=\"sm\"\n variant={isOpen ? \"secondary\" : \"outline\"}\n tooltipProps={\n hasUnseenDraft ? { content: t(\"neetoAssist.draftReady\") } : undefined\n }\n onClick={toggle}\n />\n {hasUnseenDraft && (\n <span\n aria-label={t(\"neetoAssist.draftReady\")}\n className=\"ring-background absolute -end-0.5 -top-0.5 size-2.5 rounded-full bg-purple-600 ring-2\"\n data-testid=\"neeto-assist-draft-dot\"\n role=\"status\"\n />\n )}\n </span>\n );\n};\n\nexport default NeetoAssistButton;\n"],"names":["NeetoAssistIcon","props","_jsx","Sparkle","_objectSpread","className","NeetoAssistButton","_ref","conversationId","contextLabel","onActionApplied","onUseReply","_useTranslation","useTranslation","t","isOpen","useNeetoAssistStore","state","toggle","setConversation","clearConversation","seenDraftId","seenDrafts","_useFetchRuns","useFetchRuns","_useFetchRuns$data","data","_useFetchRuns$data2","_useFetchRuns$data2$r","runs","draftId","latestDraftId","hasUnseenDraft","useReplyRef","useRef","actionAppliedRef","canUseReply","useEffect","current","handlerOnLeaving","hasLeft","id","text","html","_useReplyRef$current","call","undefined","action","_ref2","_jsxs","children","Button","icon","iconPosition","label","size","variant","tooltipProps","content","onClick","role"],"mappings":"
|
|
1
|
+
{"version":3,"file":"NeetoAssistButton.js","sources":["../app/javascript/src/components/NeetoAssistButton/index.jsx"],"sourcesContent":["import { useEffect, useRef } from \"react\";\n\nimport { Button } from \"neetoatoms\";\nimport { useTranslation } from \"react-i18next\";\n\nimport Sparkle from \"components/commons/Sparkle\";\nimport { useFetchRuns } from \"hooks/reactQuery/useRunsApi\";\nimport useNeetoAssistStore from \"stores/useNeetoAssistStore\";\nimport { latestDraftId } from \"utils/runs\";\n\nconst NeetoAssistIcon = props => (\n <Sparkle {...props} className=\"text-purple-600\" />\n);\n\n// Goes on the ticket: it opens the pane, and tells the pane which ticket it is\n// about for as long as the button is on screen, along with the host's words\n// for what the rep is looking at. A dot says a suggested reply is waiting,\n// since the pane is closed until the rep asks for it.\nconst NeetoAssistButton = ({\n conversationId,\n contextLabel,\n onActionApplied,\n onUseReply,\n}) => {\n const { t } = useTranslation();\n const isOpen = useNeetoAssistStore(state => state.isOpen);\n const toggle = useNeetoAssistStore(state => state.toggle);\n const setConversation = useNeetoAssistStore(state => state.setConversation);\n const clearConversation = useNeetoAssistStore(\n state => state.clearConversation\n );\n\n const seenDraftId = useNeetoAssistStore(\n state => state.seenDrafts[conversationId]\n );\n\n const { data: { runs = [] } = {} } = useFetchRuns(conversationId);\n const draftId = latestDraftId(runs);\n const hasUnseenDraft = !isOpen && !!draftId && draftId !== seenDraftId;\n\n // The host's handlers change on every render. Only whether there is one for\n // \"Use reply\" matters to the pane, and one for an applied action changes\n // nothing it shows, so the pane gets stand-ins that call the latest.\n const useReplyRef = useRef(onUseReply);\n const actionAppliedRef = useRef(onActionApplied);\n const canUseReply = !!onUseReply;\n useEffect(() => {\n useReplyRef.current = onUseReply;\n actionAppliedRef.current = onActionApplied;\n });\n\n useEffect(() => {\n // The answer to a click on Apply can arrive after the button has moved on\n // to another ticket. It then goes to the handler the host last gave for\n // this ticket, not to the one for the ticket now on screen.\n let handlerOnLeaving;\n let hasLeft = false;\n\n setConversation({\n id: conversationId,\n contextLabel,\n onUseReply: canUseReply\n ? (text, html) => useReplyRef.current?.(text, html)\n : undefined,\n onActionApplied: action =>\n (hasLeft ? handlerOnLeaving : actionAppliedRef.current)?.(action),\n });\n\n return () => {\n handlerOnLeaving = actionAppliedRef.current;\n hasLeft = true;\n clearConversation(conversationId);\n };\n }, [\n canUseReply,\n clearConversation,\n contextLabel,\n conversationId,\n setConversation,\n ]);\n\n return (\n <span className=\"relative inline-flex\">\n <Button\n aria-pressed={isOpen}\n data-testid=\"neeto-assist-button\"\n icon={NeetoAssistIcon}\n iconPosition=\"left\"\n label={t(\"neetoAssist.askButton\")}\n size=\"sm\"\n variant={isOpen ? \"secondary\" : \"outline\"}\n tooltipProps={\n hasUnseenDraft ? { content: t(\"neetoAssist.draftReady\") } : undefined\n }\n onClick={toggle}\n />\n {hasUnseenDraft && (\n <span\n aria-label={t(\"neetoAssist.draftReady\")}\n className=\"ring-background absolute -end-0.5 -top-0.5 size-2.5 rounded-full bg-purple-600 ring-2\"\n data-testid=\"neeto-assist-draft-dot\"\n role=\"status\"\n />\n )}\n </span>\n );\n};\n\nexport default NeetoAssistButton;\n"],"names":["NeetoAssistIcon","props","_jsx","Sparkle","_objectSpread","className","NeetoAssistButton","_ref","conversationId","contextLabel","onActionApplied","onUseReply","_useTranslation","useTranslation","t","isOpen","useNeetoAssistStore","state","toggle","setConversation","clearConversation","seenDraftId","seenDrafts","_useFetchRuns","useFetchRuns","_useFetchRuns$data","data","_useFetchRuns$data2","_useFetchRuns$data2$r","runs","draftId","latestDraftId","hasUnseenDraft","useReplyRef","useRef","actionAppliedRef","canUseReply","useEffect","current","handlerOnLeaving","hasLeft","id","text","html","_useReplyRef$current","call","undefined","action","_ref2","_jsxs","children","Button","icon","iconPosition","label","size","variant","tooltipProps","content","onClick","role"],"mappings":";;;;;;;;;;;;;;;;;;;AAUA,IAAMA,eAAe,GAAG,SAAlBA,eAAeA,CAAGC,KAAK,EAAA;EAAA,oBAC3BC,GAAA,CAACC,OAAO,EAAAC,aAAA,CAAAA,aAAA,KAAKH,KAAK,CAAA,EAAA,EAAA,EAAA;AAAEI,IAAAA,SAAS,EAAC;AAAiB,GAAA,CAAE,CAAC;AAAA,CACnD;;AAED;AACA;AACA;AACA;AACA,IAAMC,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAAC,IAAA,EAKjB;AAAA,EAAA,IAJJC,cAAc,GAAAD,IAAA,CAAdC,cAAc;IACdC,YAAY,GAAAF,IAAA,CAAZE,YAAY;IACZC,eAAe,GAAAH,IAAA,CAAfG,eAAe;IACfC,UAAU,GAAAJ,IAAA,CAAVI,UAAU;AAEV,EAAA,IAAAC,eAAA,GAAcC,cAAc,EAAE;IAAtBC,CAAC,GAAAF,eAAA,CAADE,CAAC;AACT,EAAA,IAAMC,MAAM,GAAGC,mBAAmB,CAAC,UAAAC,KAAK,EAAA;IAAA,OAAIA,KAAK,CAACF,MAAM;EAAA,CAAA,CAAC;AACzD,EAAA,IAAMG,MAAM,GAAGF,mBAAmB,CAAC,UAAAC,KAAK,EAAA;IAAA,OAAIA,KAAK,CAACC,MAAM;EAAA,CAAA,CAAC;AACzD,EAAA,IAAMC,eAAe,GAAGH,mBAAmB,CAAC,UAAAC,KAAK,EAAA;IAAA,OAAIA,KAAK,CAACE,eAAe;EAAA,CAAA,CAAC;AAC3E,EAAA,IAAMC,iBAAiB,GAAGJ,mBAAmB,CAC3C,UAAAC,KAAK,EAAA;IAAA,OAAIA,KAA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