Skip to content

Commit 4e8b985

Browse files
authored
feat: add plain-text script editor with FmScript object model (#145)
## Summary - Script tab as primary editor for script clips, XML only for persistence/clipboard - Typed FmScript object model with validation, autocomplete, and syntax highlighting - Strategy-pattern step handlers, extensible for new step types - Repo restructured to src/tests layout with SharpFM.Scripting namespace - IClipboardService/IFolderService DI, status bar, keyboard shortcuts
1 parent 7995d08 commit 4e8b985

74 files changed

Lines changed: 12932 additions & 261 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ jobs:
3939
run: dotnet test --no-build
4040

4141
- name: Publish
42-
run: dotnet publish SharpFM.csproj --runtime "${{ matrix.target }}" -c Debug
42+
run: dotnet publish src/SharpFM/SharpFM.csproj --runtime "${{ matrix.target }}" -c Debug

.github/workflows/release-artifacts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
release_name="SharpFM-$tag-${{ matrix.target }}"
3838
3939
# Build everything
40-
dotnet publish SharpFM.csproj --runtime "${{ matrix.target }}" -c Release -o "$release_name"
40+
dotnet publish src/SharpFM/SharpFM.csproj --runtime "${{ matrix.target }}" -c Release -o "$release_name"
4141
4242
# Pack files
4343
if [ "${{ matrix.target }}" == "win-x64" ]; then

.vscode/launch.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
"preLaunchTask": "build",
1212
"windows":
1313
{
14-
"program": "${workspaceFolder}/bin/Debug/net8.0/win-x64/SharpFM.dll",
14+
"program": "${workspaceFolder}/src/SharpFM/bin/Debug/net8.0/win-x64/SharpFM.dll",
1515
},
16-
"linux":
16+
"linux":
1717
{
18-
"program": "${workspaceFolder}/bin/Debug/net8.0/linux-x64/SharpFM.dll",
18+
"program": "${workspaceFolder}/src/SharpFM/bin/Debug/net8.0/linux-x64/SharpFM.dll",
1919
},
2020
"args": [],
2121
"cwd": "${workspaceFolder}",

MainWindow.axaml.cs

Lines changed: 0 additions & 36 deletions
This file was deleted.

SharpFM.sln

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 17
44
VisualStudioVersion = 17.0.31903.59
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpFM", "SharpFM.csproj", "{5245F468-DAD7-478C-8E5F-518A03664F71}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpFM", "src\SharpFM\SharpFM.csproj", "{5245F468-DAD7-478C-8E5F-518A03664F71}"
7+
EndProject
8+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{E2FF2BB3-AF37-44BA-BD84-999B352D814E}"
9+
EndProject
10+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpFM.Tests", "tests\SharpFM.Tests\SharpFM.Tests.csproj", "{5B228160-ECB9-4DFC-91D7-413AE9900617}"
711
EndProject
812
Global
913
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -22,5 +26,12 @@ Global
2226
{9E4B6169-0E69-430A-BF6C-184A10C71F9B}.Debug|Any CPU.Build.0 = Debug|Any CPU
2327
{9E4B6169-0E69-430A-BF6C-184A10C71F9B}.Release|Any CPU.ActiveCfg = Release|Any CPU
2428
{9E4B6169-0E69-430A-BF6C-184A10C71F9B}.Release|Any CPU.Build.0 = Release|Any CPU
29+
{5B228160-ECB9-4DFC-91D7-413AE9900617}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
30+
{5B228160-ECB9-4DFC-91D7-413AE9900617}.Debug|Any CPU.Build.0 = Debug|Any CPU
31+
{5B228160-ECB9-4DFC-91D7-413AE9900617}.Release|Any CPU.ActiveCfg = Release|Any CPU
32+
{5B228160-ECB9-4DFC-91D7-413AE9900617}.Release|Any CPU.Build.0 = Release|Any CPU
33+
EndGlobalSection
34+
GlobalSection(NestedProjects) = preSolution
35+
{5B228160-ECB9-4DFC-91D7-413AE9900617} = {E2FF2BB3-AF37-44BA-BD84-999B352D814E}
2536
EndGlobalSection
2637
EndGlobal

THIRD_PARTY_NOTICES

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
SharpFM uses third-party components under the following licenses:
2+
3+
================================================================================
4+
agentic-fm
5+
https://github.com/petrowsky/agentic-fm
6+
================================================================================
7+
8+
Copyright 2026 Matt Petrowsky
9+
10+
Licensed under the Apache License, Version 2.0 (the "License");
11+
you may not use this file except in compliance with the License.
12+
You may obtain a copy of the License at
13+
14+
http://www.apache.org/licenses/LICENSE-2.0
15+
16+
Unless required by applicable law or agreed to in writing, software
17+
distributed under the License is distributed on an "AS IS" BASIS,
18+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19+
See the License for the specific language governing permissions and
20+
limitations under the License.
21+
22+
Files derived from agentic-fm:
23+
- Core/ScriptConverter/step-catalog-en.json (step catalog data)
24+
- Core/ScriptConverter/ (converter logic ported from TypeScript to C#)

ViewModels/ClipViewModel.cs

Lines changed: 0 additions & 71 deletions
This file was deleted.
File renamed without changes.

App.axaml.cs renamed to src/SharpFM/App.axaml.cs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,17 @@ public override void OnFrameworkInitializationCompleted()
2323
{
2424
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
2525
{
26-
desktop.MainWindow = new MainWindow
27-
{
28-
DataContext = new MainWindowViewModel(logger)
29-
};
26+
desktop.MainWindow = new MainWindow();
3027

3128
var services = new ServiceCollection();
32-
33-
services.AddSingleton(x => new FolderService(desktop.MainWindow));
34-
29+
services.AddSingleton<IFolderService>(x => new FolderService(desktop.MainWindow));
30+
services.AddSingleton<IClipboardService>(x => new ClipboardService(desktop.MainWindow));
3531
Services = services.BuildServiceProvider();
32+
33+
desktop.MainWindow.DataContext = new MainWindowViewModel(
34+
logger,
35+
Services.GetRequiredService<IClipboardService>(),
36+
Services.GetRequiredService<IFolderService>());
3637
}
3738

3839
base.OnFrameworkInitializationCompleted();
File renamed without changes.

0 commit comments

Comments
 (0)