jp.keijiro.ai.assistant.extensions 1.2.0 → 1.2.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.
- package/.attestation.p7m +0 -0
- package/CHANGELOG.md +6 -0
- package/Editor/ConversationExtractorWindow.cs +18 -9
- package/package.json +3 -3
package/.attestation.p7m
CHANGED
|
Binary file
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
|
6
6
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.2.1] - 2026-06-05
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- Prefixed saved conversation filenames with the conversation's date and time so exported files sort chronologically.
|
|
13
|
+
|
|
8
14
|
## [1.2.0] - 2026-06-05
|
|
9
15
|
|
|
10
16
|
### Changed
|
|
@@ -300,10 +300,11 @@ class ConversationExtractorWindow : EditorWindow
|
|
|
300
300
|
{
|
|
301
301
|
var projectRoot = Directory.GetParent(Application.dataPath)?.FullName ?? Directory.GetCurrentDirectory();
|
|
302
302
|
var index = _listView?.selectedIndex ?? -1;
|
|
303
|
-
var
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
var
|
|
303
|
+
var hasSelection = index >= 0 && index < _conversations.Count;
|
|
304
|
+
var name = hasSelection ? SanitizeFileName(_conversations[index].Title) : "conversation";
|
|
305
|
+
var stamp = hasSelection ? FormatFileTimestamp(_conversations[index].Timestamp) : "";
|
|
306
|
+
var fileName = string.IsNullOrEmpty(stamp) ? name : $"{stamp} {name}";
|
|
307
|
+
var defaultPath = Path.Combine(projectRoot, "Logs", $"{fileName}.md");
|
|
307
308
|
var path = EditorUtility.SaveFilePanel("Save extracted conversation", Path.GetDirectoryName(defaultPath), Path.GetFileName(defaultPath), "md");
|
|
308
309
|
if (string.IsNullOrEmpty(path)) return;
|
|
309
310
|
|
|
@@ -528,18 +529,26 @@ class ConversationExtractorWindow : EditorWindow
|
|
|
528
529
|
}
|
|
529
530
|
|
|
530
531
|
static string FormatDate(long timestamp)
|
|
532
|
+
=> TryGetLocalTime(timestamp, out var time) ? time.ToString("yyyy-MM-dd HH:mm") : "";
|
|
533
|
+
|
|
534
|
+
// Date and time for filenames; colon-free so it is filesystem-safe and sortable.
|
|
535
|
+
static string FormatFileTimestamp(long timestamp)
|
|
536
|
+
=> TryGetLocalTime(timestamp, out var time) ? time.ToString("yyyy-MM-dd HH-mm") : "";
|
|
537
|
+
|
|
538
|
+
static bool TryGetLocalTime(long timestamp, out DateTimeOffset time)
|
|
531
539
|
{
|
|
532
|
-
|
|
540
|
+
time = default;
|
|
541
|
+
if (timestamp <= 0) return false;
|
|
533
542
|
try
|
|
534
543
|
{
|
|
535
|
-
|
|
544
|
+
time = (timestamp > 1_000_000_000_000L
|
|
536
545
|
? DateTimeOffset.FromUnixTimeMilliseconds(timestamp)
|
|
537
|
-
: DateTimeOffset.FromUnixTimeSeconds(timestamp);
|
|
538
|
-
return
|
|
546
|
+
: DateTimeOffset.FromUnixTimeSeconds(timestamp)).ToLocalTime();
|
|
547
|
+
return true;
|
|
539
548
|
}
|
|
540
549
|
catch
|
|
541
550
|
{
|
|
542
|
-
return
|
|
551
|
+
return false;
|
|
543
552
|
}
|
|
544
553
|
}
|
|
545
554
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jp.keijiro.ai.assistant.extensions",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"displayName": "AI Assistant Extensions",
|
|
5
5
|
"description": "Custom Unity package that provides extensions for Unity AI Assistant.",
|
|
6
6
|
"unity": "6000.0",
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
"licensesUrl": "https://github.com/keijiro/AIA-Extensions/blob/master/LICENSE",
|
|
14
14
|
"license": "Unlicense",
|
|
15
15
|
"_upm": {
|
|
16
|
-
"changelog": "<b>Changed</b><br>-
|
|
16
|
+
"changelog": "<b>Changed</b><br>- Prefixed saved conversation filenames with the conversation's date and time so exported files sort chronologically."
|
|
17
17
|
},
|
|
18
18
|
"repository": {
|
|
19
19
|
"url": "git@github.com:keijiro/AIA-Extensions.git",
|
|
20
20
|
"type": "git",
|
|
21
|
-
"revision": "
|
|
21
|
+
"revision": "6c89672e11d612d4416afa8f114af153fae8ec6a"
|
|
22
22
|
}
|
|
23
23
|
}
|