agents_control 0.4.0 → 0.4.1
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.
- checksums.yaml +4 -4
- data/lib/agents_control/channels/telegram/router.rb +17 -5
- data/lib/agents_control/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c3874da604b267aa3a3cc898e173359dc8170e1a9ed2de69558a273e8b5a58a4
|
|
4
|
+
data.tar.gz: 58979572d52e5be675385e063fb27a7b7d49e227a910b93994560b303b54c642
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eb6bf2f450eb26865fb5cba496e050aaa147688600be1e46815ed9b50050f6153aff9ab870cd0a60d9bb26f52cbef7c133afb66eb38ae4f2a6d2fd353481c2c1
|
|
7
|
+
data.tar.gz: f91a16af53fca99ef7485276532eebbcc4561e61434759afcf0b021dc143f3bb269c8614d8ff4b10355609f63eb1b53b658a19bd5ad62f8ffce851e1869a07ca
|
|
@@ -220,11 +220,13 @@ module AgentsControl
|
|
|
220
220
|
say(chat_id, "Couldn't save that file: #{@api.redact(e.message)}")
|
|
221
221
|
end
|
|
222
222
|
|
|
223
|
-
#
|
|
224
|
-
#
|
|
225
|
-
#
|
|
226
|
-
#
|
|
227
|
-
#
|
|
223
|
+
# Ways to say where it goes, in order of how explicit they are: a
|
|
224
|
+
# caption naming a tab, a reply to something already tied to a
|
|
225
|
+
# session, the rest of an album, or the session that spoke last —
|
|
226
|
+
# for an agent only, since a bare path typed into a shell is a
|
|
227
|
+
# command, not a file handed over. With none of those the path is
|
|
228
|
+
# just handed back: guessing further is how a file ends up pasted
|
|
229
|
+
# into the wrong project.
|
|
228
230
|
def deliver_file(chat_id, message, path)
|
|
229
231
|
caption = message["caption"].to_s.strip
|
|
230
232
|
album = album_key(chat_id, message)
|
|
@@ -245,6 +247,16 @@ module AgentsControl
|
|
|
245
247
|
return execute(chat_id, session, with_path("", path))
|
|
246
248
|
end
|
|
247
249
|
|
|
250
|
+
if (last = @store.get(last_target_key(chat_id)))
|
|
251
|
+
session = session_for(chat_id, last)
|
|
252
|
+
return unless session
|
|
253
|
+
|
|
254
|
+
if session.agent?
|
|
255
|
+
execute(chat_id, session, with_path(caption, path))
|
|
256
|
+
return remember_album(album, session)
|
|
257
|
+
end
|
|
258
|
+
end
|
|
259
|
+
|
|
248
260
|
say(chat_id, "Saved:\n\n`#{path}`\n\nReply to a session's message with a file to hand it " \
|
|
249
261
|
"straight over, or caption it `/run N`.")
|
|
250
262
|
end
|