AsyrilSA / log-viewer

MIT License
2 stars 0 forks source link

Sweep: Display the timestamp with milliseconds in LogTable and CommunicationLogTable #2

Closed patrickclerc closed 11 months ago

patrickclerc commented 11 months ago

Currently the timestamp is displayed using toLocaleString() method which doesn't shows the milliseconds.

In CommunicationLogTable.vue and LogTable.vue the timestamp must be displayed with the date and the time with milliseconds.

Checklist - [X] Modify `src/components/CommunicationLogTable.vue` ✓ https://github.com/AsyrilSA/log-viewer/commit/a87523a8e304d764e2dd0e7008b72fce004565e0 [Edit](https://github.com/AsyrilSA/log-viewer/edit/sweep/sweep_display_the_timestamp_with_millise/src/components/CommunicationLogTable.vue#L22-L22) - [X] Running GitHub Actions for `src/components/CommunicationLogTable.vue` ✓ [Edit](https://github.com/AsyrilSA/log-viewer/edit/sweep/sweep_display_the_timestamp_with_millise/src/components/CommunicationLogTable.vue#L22-L22) - [X] Modify `src/components/LogTable.vue` ✓ https://github.com/AsyrilSA/log-viewer/commit/d8f5478adcbe9c371de6c72ec61144391f9c799a [Edit](https://github.com/AsyrilSA/log-viewer/edit/sweep/sweep_display_the_timestamp_with_millise/src/components/LogTable.vue#L22-L22) - [X] Running GitHub Actions for `src/components/LogTable.vue` ✓ [Edit](https://github.com/AsyrilSA/log-viewer/edit/sweep/sweep_display_the_timestamp_with_millise/src/components/LogTable.vue#L22-L22)
sweep-ai[bot] commented 11 months ago

🚀 Here's the PR! #3

See Sweep's progress at the progress dashboard!
Sweep Basic Tier: I'm using GPT-4. You have 5 GPT-4 tickets left for the month and 3 for the day. (tracking ID: b40570c18c)

For more GPT-4 tickets, visit our payment portal. For a one week free trial, try Sweep Pro (unlimited GPT-4 tickets).
Install Sweep Configs: Pull Request

Actions (click)

Sandbox Execution ✓

Here are the sandbox execution logs prior to making any changes:

Sandbox logs for fae3eaf
Checking src/components/CommunicationLogTable.vue for syntax errors... ✅ src/components/CommunicationLogTable.vue has no syntax errors! 1/1 ✓
Checking src/components/CommunicationLogTable.vue for syntax errors...
✅ src/components/CommunicationLogTable.vue has no syntax errors!

Sandbox passed on the latest master, so sandbox checks will be enabled for this issue.


Step 1: 🔎 Searching

I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.

Some code snippets I think are relevant in decreasing order of relevance (click to expand). If some file is missing from here, you can mention the path in the ticket description. https://github.com/AsyrilSA/log-viewer/blob/fae3eaf33403bfd2fee33226b7ec8748c1e178a5/src/components/CommunicationLogTable.vue#L21-L22 https://github.com/AsyrilSA/log-viewer/blob/fae3eaf33403bfd2fee33226b7ec8748c1e178a5/src/components/LogTable.vue#L21-L22

Step 2: ⌨️ Coding

--- 
+++ 
@@ -20,7 +20,7 @@
           {{ props.row.id }}
         
         
-          {{ props.row.timestamp?.toLocaleString(dateLocale) || '' }}
+          {{ new Date(props.row.timestamp).toISOString() || '' }}
         
         
           
@@ -197,7 +197,7 @@ field: 'timestamp', sortable: true, format: (value: Date) => { - if (value) return value.toLocaleString(dateLocale); + if (value) return new Date(value).toISOString(); }, }, {

Ran GitHub Actions for a87523a8e304d764e2dd0e7008b72fce004565e0:

--- 
+++ 
@@ -20,7 +20,7 @@
           {{ props.row.id }}
         
         
-          {{ props.row.timestamp?.toLocaleString(dateLocale) || '' }}
+          {{ new Date(props.row.timestamp).toISOString() || '' }}
         
          {
-      if (value) return value.toLocaleString(dateLocale);
+      if (value) return new Date(value).toISOString();
     },
   },
   {

Ran GitHub Actions for d8f5478adcbe9c371de6c72ec61144391f9c799a:


Step 3: 🔁 Code Review

I have finished reviewing the code for completeness. I did not find errors for sweep/sweep_display_the_timestamp_with_millise.


🎉 Latest improvements to Sweep:


💡 To recreate the pull request edit the issue title or description. To tweak the pull request, leave a comment on the pull request. Join Our Discord