Compare commits
4 Commits
c12f3bdfcd
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 79cc9f26c9 | |||
| b7c251314a | |||
| a76a8fa680 | |||
| 8fea308580 |
@@ -23,14 +23,18 @@ copy it; aindrive shows it only once.
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
Saving the connection checks the address and the token. It does not need the
|
Saving the connection checks the address and the token. With a wrong token the
|
||||||
machine that shares the drive to be online, but its files only answer while
|
connection shows as **Disconnected**:
|
||||||
that machine runs aindrive; until then they report the folder unavailable.
|
|
||||||
|
|
||||||
With a wrong token the connection shows as **Disconnected**:
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
The check does not need the machine that shares the drive to be online, but its
|
||||||
|
files only answer while that machine runs aindrive. Until then the connection
|
||||||
|
stays **Connected** and the plugin reports the drive unavailable, which Memona
|
||||||
|
shows as a folder that cannot be read:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## What works
|
## What works
|
||||||
|
|
||||||
Browsing folders, and reading, saving and deleting files. A token generated
|
Browsing folders, and reading, saving and deleting files. A token generated
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 9.5 KiB |
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"schemaVersion": 2,
|
"schemaVersion": 2,
|
||||||
"id": "memona/aindrive",
|
"id": "jopilgue/aindrive",
|
||||||
"name": "aindrive",
|
"name": "aindrive",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"apiVersion": "0.1.0",
|
"apiVersion": "0.1.0",
|
||||||
|
|||||||
+9
-9
@@ -70,26 +70,26 @@ mod tests {
|
|||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn the_mcp_panel_url_is_used_as_given() {
|
async fn the_mcp_panel_url_is_used_as_given() {
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
endpoint("https://aindrive.ainetwork.ai/mcp/d/KQHGpl8hFXq8"),
|
endpoint("https://aindrive.ainetwork.ai/mcp/d/AbCdEf123456"),
|
||||||
Ok("https://aindrive.ainetwork.ai/mcp/d/KQHGpl8hFXq8".to_owned())
|
Ok("https://aindrive.ainetwork.ai/mcp/d/AbCdEf123456".to_owned())
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
endpoint(" https://aindrive.ainetwork.ai/mcp/d/KQHGpl8hFXq8/ \n"),
|
endpoint(" https://aindrive.ainetwork.ai/mcp/d/AbCdEf123456/ \n"),
|
||||||
Ok("https://aindrive.ainetwork.ai/mcp/d/KQHGpl8hFXq8".to_owned())
|
Ok("https://aindrive.ainetwork.ai/mcp/d/AbCdEf123456".to_owned())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn a_drive_page_address_finds_the_same_endpoint() {
|
async fn a_drive_page_address_finds_the_same_endpoint() {
|
||||||
for page in [
|
for page in [
|
||||||
"https://aindrive.ainetwork.ai/d/KQHGpl8hFXq8",
|
"https://aindrive.ainetwork.ai/d/AbCdEf123456",
|
||||||
"https://aindrive.ainetwork.ai/d/KQHGpl8hFXq8?path=notes",
|
"https://aindrive.ainetwork.ai/d/AbCdEf123456?path=notes",
|
||||||
"https://aindrive.ainetwork.ai/d/KQHGpl8hFXq8/notes/today.md",
|
"https://aindrive.ainetwork.ai/d/AbCdEf123456/notes/today.md",
|
||||||
"https://aindrive.ainetwork.ai/d/KQHGpl8hFXq8/manage#members",
|
"https://aindrive.ainetwork.ai/d/AbCdEf123456/manage#members",
|
||||||
] {
|
] {
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
endpoint(page),
|
endpoint(page),
|
||||||
Ok("https://aindrive.ainetwork.ai/mcp/d/KQHGpl8hFXq8".to_owned()),
|
Ok("https://aindrive.ainetwork.ai/mcp/d/AbCdEf123456".to_owned()),
|
||||||
"{page}"
|
"{page}"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,13 +8,13 @@ use crate::sdk::{
|
|||||||
};
|
};
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
|
|
||||||
const ENDPOINT: &str = "https://aindrive.ainetwork.ai/mcp/d/KQHGpl8hFXq8";
|
const ENDPOINT: &str = "https://aindrive.ainetwork.ai/mcp/d/AbCdEf123456";
|
||||||
|
|
||||||
fn config() -> Vec<(String, Setting)> {
|
fn config() -> Vec<(String, Setting)> {
|
||||||
vec![
|
vec![
|
||||||
(
|
(
|
||||||
"url".to_owned(),
|
"url".to_owned(),
|
||||||
Setting::Text("https://aindrive.ainetwork.ai/d/KQHGpl8hFXq8".to_owned()),
|
Setting::Text("https://aindrive.ainetwork.ai/d/AbCdEf123456".to_owned()),
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
"token".to_owned(),
|
"token".to_owned(),
|
||||||
|
|||||||
Reference in New Issue
Block a user