Skip to content

Commit

Permalink
add saving & test migrations.toml in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
trevyn committed Jul 23, 2024
1 parent 0186216 commit abf07cb
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
rust: [stable, beta]
rust: [nightly]

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
if: ${{ matrix.os == 'windows-latest' }}

- uses: actions/upload-artifact@v4
if: ${{ matrix.rust == 'stable' }}
if: ${{ matrix.rust == 'nightly' }}
with:
name: ${{ matrix.os }}
path: brace
Expand Down
2 changes: 2 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[toolchain]
channel = "nightly"
39 changes: 31 additions & 8 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![forbid(unsafe_code)]
#![allow(unused_imports, dead_code)]
// #![feature(let_chains)]
#![feature(let_chains)]

use async_openai::types::ChatCompletionRequestMessage;
use async_openai::types::Role::{self, *};
Expand Down Expand Up @@ -78,13 +78,6 @@ impl Setting {
}
}

#[derive(Turbosql, Default)]
struct SampleData {
rowid: Option<i64>,
record_ms: i64,
sample_data: Blob,
}

#[derive(Turbosql, Default)]
struct Card {
rowid: Option<i64>,
Expand Down Expand Up @@ -116,13 +109,28 @@ struct CardLog {
action: Action,
}

#[derive(Turbosql, Default)]
struct SampleData {
rowid: Option<i64>,
record_ms: i64,
sample_data: Blob,
}

#[derive(Turbosql, Default)]
struct Prompt {
rowid: Option<i64>,
time_ms: i64,
prompt: String,
}

#[derive(Turbosql, Default)]
struct Document {
rowid: Option<i64>,
title: String,
content: String,
timestamp_ms: i64,
}

struct Resource {
/// HTTP response
response: ehttp::Response,
Expand Down Expand Up @@ -301,6 +309,21 @@ impl eframe::App for App {
if i.key_pressed(Key::W) && i.modifiers.command {
request_close = true;
}
if i.key_pressed(Key::S) && i.modifiers.command {
let wheel_windows = WHEEL_WINDOWS.lock().unwrap();
if let Some(window) = wheel_windows.get(0)
&& let Some(message) = window.messages.get(0)
{
Document {
rowid: None,
title: "primary".into(),
content: message.content.clone(),
timestamp_ms: now_ms(),
}
.insert()
.unwrap();
}
}
});
// ctx.input(|i| {
// if i.key_pressed(Key::ArrowDown) {
Expand Down

0 comments on commit abf07cb

Please sign in to comment.