- OpenRouter as an alternative chat provider: server-side API key (settings.json or OPENROUTER_API_KEY), model list with vision marks and filter, SSE streaming, images as data URLs. Memory embeddings stay on Ollama; park/warm LLM are no-ops for the remote provider. - AssistentSaveKnowledgeAttach: JArray param is not supported by SwarmUI API reflection and aborted registration of every later API call; use string[]. - SQLite bootstrap: preload native e_sqlite3 for the current OS/arch (win/osx/linux) and resolve DllImport to it. - settings.json: shared-read + atomic write with retry to avoid Windows sharing violations. - csproj: fix MSB4012 in the native SQLite copy target. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
45 lines
2.6 KiB
XML
45 lines
2.6 KiB
XML
<Project Sdk="Microsoft.NET.Sdk.Web">
|
|
<PropertyGroup>
|
|
<AssemblyName>SwarmAssistentExtension</AssemblyName>
|
|
</PropertyGroup>
|
|
<ItemGroup>
|
|
<PackageReference Include="Microsoft.Data.Sqlite" Version="8.0.11" />
|
|
<PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" Version="2.1.10" />
|
|
</ItemGroup>
|
|
<Import Project="../../SwarmUI.extension.props" />
|
|
<!-- Must come after the import: SwarmUI.extension.props disables it, but the Sqlite
|
|
assemblies have to sit next to the extension dll for SwarmExtensionLoadContext
|
|
to resolve them as private deps. -->
|
|
<PropertyGroup>
|
|
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
|
</PropertyGroup>
|
|
<!-- Everything else in the lock file is already loaded by the SwarmUI host. -->
|
|
<Target Name="ShipOnlySqlitePrivateDeps" AfterTargets="ResolveReferences">
|
|
<ItemGroup>
|
|
<ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)"
|
|
Condition="'%(ReferenceCopyLocalPaths.NuGetPackageId)' != 'Microsoft.Data.Sqlite'
|
|
AND '%(ReferenceCopyLocalPaths.NuGetPackageId)' != 'Microsoft.Data.Sqlite.Core'
|
|
AND !$([System.String]::Copy('%(ReferenceCopyLocalPaths.NuGetPackageId)').StartsWith('SQLitePCLRaw'))" />
|
|
</ItemGroup>
|
|
</Target>
|
|
<!-- Native libe_sqlite3 for Linux — also copy flat names the loader probes. -->
|
|
<Target Name="CopySqliteNativeRuntimes" AfterTargets="Build">
|
|
<ItemGroup>
|
|
<_SqliteNative Include="@(RuntimeCopyLocalItems)"
|
|
Condition="$([System.String]::Copy('%(RuntimeCopyLocalItems.DestinationSubPath)').Contains('e_sqlite3'))" />
|
|
</ItemGroup>
|
|
<Copy SourceFiles="@(_SqliteNative)"
|
|
DestinationFiles="@(_SqliteNative->'$(OutputPath)%(DestinationSubPath)')"
|
|
SkipUnchangedFiles="true"
|
|
Condition="'@(_SqliteNative)' != ''" />
|
|
<Copy SourceFiles="@(_SqliteNative)"
|
|
DestinationFiles="$(OutputPath)%(Filename)%(Extension)"
|
|
SkipUnchangedFiles="true"
|
|
Condition="'@(_SqliteNative)' != '' and $([System.String]::Copy('%(RuntimeCopyLocalItems.DestinationSubPath)').Contains('linux-x64'))" />
|
|
<Copy SourceFiles="@(_SqliteNative)"
|
|
DestinationFiles="$(OutputPath)e_sqlite3%(Extension)"
|
|
SkipUnchangedFiles="true"
|
|
Condition="'@(_SqliteNative)' != '' and $([System.String]::Copy('%(RuntimeCopyLocalItems.DestinationSubPath)').Contains('linux-x64')) and $([System.String]::Copy('%(Filename)').Contains('libe_sqlite3'))" />
|
|
</Target>
|
|
</Project>
|