Compare commits

..

1 Commits

Author SHA1 Message Date
RaymondCho c12f3bdfcd The README shows how a connected drive looks in Memona
CI / checks (pull_request) Successful in 1m28s
Agents / bot (pull_request) Successful in 3m19s
Screenshots of the connection form, a connection with a wrong token, a
drive's PAGE.md and a save that met a change from elsewhere, taken in
Memona running this plugin against a live drive. They link to main so
they also render on the plugin page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 23:14:14 +09:00
5 changed files with 17 additions and 21 deletions
+5 -9
View File
@@ -23,18 +23,14 @@ copy it; aindrive shows it only once.
![The connection form](https://git.capsulizers.com/commons/memona-plugin-aindrive/raw/branch/main/images/connection-form.png)
Saving the connection checks the address and the token. With a wrong token the
connection shows as **Disconnected**:
Saving the connection checks the address and the token. It does not need the
machine that shares the drive to be online, but its files only answer while
that machine runs aindrive; until then they report the folder unavailable.
With a wrong token the connection shows as **Disconnected**:
![A connected drive and one with a wrong token](https://git.capsulizers.com/commons/memona-plugin-aindrive/raw/branch/main/images/connections.png)
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:
![The drive's folder while its machine is offline](https://git.capsulizers.com/commons/memona-plugin-aindrive/raw/branch/main/images/offline-folder.png)
## What works
Browsing folders, and reading, saving and deleting files. A token generated
Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.5 KiB

+1 -1
View File
@@ -1,6 +1,6 @@
{
"schemaVersion": 2,
"id": "jopilgue/aindrive",
"id": "memona/aindrive",
"name": "aindrive",
"version": "0.1.0",
"apiVersion": "0.1.0",
+9 -9
View File
@@ -70,26 +70,26 @@ mod tests {
#[tokio::test]
async fn the_mcp_panel_url_is_used_as_given() {
assert_eq!(
endpoint("https://aindrive.ainetwork.ai/mcp/d/AbCdEf123456"),
Ok("https://aindrive.ainetwork.ai/mcp/d/AbCdEf123456".to_owned())
endpoint("https://aindrive.ainetwork.ai/mcp/d/KQHGpl8hFXq8"),
Ok("https://aindrive.ainetwork.ai/mcp/d/KQHGpl8hFXq8".to_owned())
);
assert_eq!(
endpoint(" https://aindrive.ainetwork.ai/mcp/d/AbCdEf123456/ \n"),
Ok("https://aindrive.ainetwork.ai/mcp/d/AbCdEf123456".to_owned())
endpoint(" https://aindrive.ainetwork.ai/mcp/d/KQHGpl8hFXq8/ \n"),
Ok("https://aindrive.ainetwork.ai/mcp/d/KQHGpl8hFXq8".to_owned())
);
}
#[tokio::test]
async fn a_drive_page_address_finds_the_same_endpoint() {
for page in [
"https://aindrive.ainetwork.ai/d/AbCdEf123456",
"https://aindrive.ainetwork.ai/d/AbCdEf123456?path=notes",
"https://aindrive.ainetwork.ai/d/AbCdEf123456/notes/today.md",
"https://aindrive.ainetwork.ai/d/AbCdEf123456/manage#members",
"https://aindrive.ainetwork.ai/d/KQHGpl8hFXq8",
"https://aindrive.ainetwork.ai/d/KQHGpl8hFXq8?path=notes",
"https://aindrive.ainetwork.ai/d/KQHGpl8hFXq8/notes/today.md",
"https://aindrive.ainetwork.ai/d/KQHGpl8hFXq8/manage#members",
] {
assert_eq!(
endpoint(page),
Ok("https://aindrive.ainetwork.ai/mcp/d/AbCdEf123456".to_owned()),
Ok("https://aindrive.ainetwork.ai/mcp/d/KQHGpl8hFXq8".to_owned()),
"{page}"
);
}
+2 -2
View File
@@ -8,13 +8,13 @@ use crate::sdk::{
};
use std::collections::BTreeMap;
const ENDPOINT: &str = "https://aindrive.ainetwork.ai/mcp/d/AbCdEf123456";
const ENDPOINT: &str = "https://aindrive.ainetwork.ai/mcp/d/KQHGpl8hFXq8";
fn config() -> Vec<(String, Setting)> {
vec![
(
"url".to_owned(),
Setting::Text("https://aindrive.ainetwork.ai/d/AbCdEf123456".to_owned()),
Setting::Text("https://aindrive.ainetwork.ai/d/KQHGpl8hFXq8".to_owned()),
),
(
"token".to_owned(),