Skip to content

Commit 4cbf6b8

Browse files
author
prima
committed
Merge remote-tracking branch 'origin/concedo_experimental' into remoteManagement
2 parents 692ee85 + 01c1acc commit 4cbf6b8

File tree

384 files changed

+39540
-22007
lines changed

Some content is hidden

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

384 files changed

+39540
-22007
lines changed

.clang-format

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ AllowShortIfStatementsOnASingleLine: Never
2222
AllowShortLambdasOnASingleLine: Inline
2323
AllowShortLoopsOnASingleLine: false
2424
AlwaysBreakBeforeMultilineStrings: true
25+
# Treat CUDA keywords/attributes as "attribute macros" and avoid breaking lines inside them
26+
AttributeMacros:
27+
- __host__
28+
- __device__
29+
- __global__
30+
- __forceinline__
31+
- __launch_bounds__
2532
BinPackArguments: true
2633
BinPackParameters: false # OnePerLine
2734
BitFieldColonSpacing: Both

.editorconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,11 @@ insert_final_newline = unset
5252
[vendor/miniaudio/miniaudio.h]
5353
trim_trailing_whitespace = unset
5454
insert_final_newline = unset
55+
56+
[tools/server/webui/**]
57+
indent_style = unset
58+
indent_size = unset
59+
end_of_line = unset
60+
charset = unset
61+
trim_trailing_whitespace = unset
62+
insert_final_newline = unset
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
trigger: manual
3+
---
4+
5+
#### Tailwind & CSS
6+
7+
- We are using Tailwind v4 which uses oklch colors so we now want to refer to the CSS vars directly, without wrapping it with any color function like `hsla/hsl`, `rgba` etc.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
trigger: manual
3+
---
4+
5+
# Coding rules
6+
7+
## Svelte & SvelteKit
8+
9+
### Services vs Stores Separation Pattern
10+
11+
#### `lib/services/` - Pure Business Logic
12+
13+
- **Purpose**: Stateless business logic and external communication
14+
- **Contains**:
15+
- API calls to external services (ApiService)
16+
- Pure business logic functions (ChatService, etc.)
17+
- **Rules**:
18+
- NO Svelte runes ($state, $derived, $effect)
19+
- NO reactive state management
20+
- Pure functions and classes only
21+
- Can import types but not stores
22+
- Focus on "how" - implementation details
23+
24+
#### `lib/stores/` - Reactive State Management
25+
26+
- **Purpose**: Svelte-specific reactive state with runes
27+
- **Contains**:
28+
- Reactive state classes with $state, $derived, $effect
29+
- Database operations (DatabaseStore)
30+
- UI-focused state management
31+
- Store orchestration logic
32+
- **Rules**:
33+
- USE Svelte runes for reactivity
34+
- Import and use services for business logic
35+
- NO direct database operations
36+
- NO direct API calls (use services)
37+
- Focus on "what" - reactive state for UI
38+
39+
#### Enforcement
40+
41+
- Services should be testable without Svelte
42+
- Stores should leverage Svelte's reactivity system
43+
- Clear separation: services handle data, stores handle state
44+
- Services can be reused across multiple stores
45+
46+
#### Misc
47+
48+
- Always use `let` for $derived state variables

.windsurf/rules/tests.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
trigger: manual
3+
---
4+
5+
# Automated Tests
6+
7+
## General rules
8+
9+
- NEVER include any test code in the production code - we should always have it in a separate dedicated files
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
trigger: manual
3+
---
4+
5+
## TypeScript
6+
7+
- Add JSDocs for functions

Makefile

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ CFLAGS += -DLLAMA_USE_LLGUIDANCE
8181
CXXFLAGS += -DLLAMA_USE_LLGUIDANCE
8282
LDFLAGS += -Lllguidance/target/release -lllguidance
8383
OBJS_FULL += llguidance.o
84-
llguidance.o: common/llguidance.cpp
84+
llguidance:
85+
git clone --depth=1 --branch v1.2.0 https://github.com/guidance-ai/llguidance.git
86+
llguidance.o: common/llguidance.cpp llguidance
8587
cd llguidance && cargo build --release
8688
$(CXX) $(CXXFLAGS) -Illguidance/target/release -c $< -o $@
8789
endif
@@ -316,17 +318,29 @@ ifdef LLAMA_METAL
316318
CFLAGS += -DGGML_USE_METAL -DGGML_METAL_NDEBUG -DSD_USE_METAL
317319
CXXFLAGS += -DGGML_USE_METAL -DSD_USE_METAL
318320
LDFLAGS += -framework Foundation -framework Metal -framework MetalKit -framework MetalPerformanceShaders
319-
OBJS += ggml-metal.o ggml-metal-common.o
321+
OBJS += ggml-metal.o ggml-metal-device.o ggml-metal-device-m.o ggml-metal-context-m.o ggml-metal-common.o ggml-metal-ops.o
320322

321323
ggml-metal-common.o: ggml/src/ggml-metal/ggml-metal-common.cpp ggml/src/ggml-metal/ggml-metal-common.h
322324
$(CXX) $(CXXFLAGS) -c $< -o $@
323325

324-
ggml-metal.o: ggml/src/ggml-metal/ggml-metal.m ggml/src/ggml-metal/ggml-metal-impl.h ggml/include/ggml-metal.h
326+
ggml-metal-ops.o: ggml/src/ggml-metal/ggml-metal-ops.cpp ggml/src/ggml-metal/ggml-metal-ops.h
327+
$(CXX) $(CXXFLAGS) -c $< -o $@
328+
329+
ggml-metal.o: ggml/src/ggml-metal/ggml-metal.cpp
330+
$(CXX) $(CXXFLAGS) -c $< -o $@
331+
332+
ggml-metal-device.o: ggml/src/ggml-metal/ggml-metal-device.cpp
333+
$(CXX) $(CXXFLAGS) -c $< -o $@
334+
335+
ggml-metal-device-m.o: ggml/src/ggml-metal/ggml-metal-device.m ggml/src/ggml-metal/ggml-metal-impl.h ggml/include/ggml-metal.h
325336
@echo "== Preparing merged Metal file =="
326337
@sed -e '/#include "ggml-common.h"/r ggml/src/ggml-common.h' -e '/#include "ggml-common.h"/d' < ggml/src/ggml-metal/ggml-metal.metal > ggml/src/ggml-metal/ggml-metal-embed.metal.tmp
327338
@sed -e '/#include "ggml-metal-impl.h"/r ggml/src/ggml-metal/ggml-metal-impl.h' -e '/#include "ggml-metal-impl.h"/d' < ggml/src/ggml-metal/ggml-metal-embed.metal.tmp > ggml/src/ggml-metal/ggml-metal-merged.metal
328339
@cp ggml/src/ggml-metal/ggml-metal-merged.metal ./ggml-metal-merged.metal
329340
$(CC) $(CFLAGS) -c $< -o $@
341+
342+
ggml-metal-context-m.o: ggml/src/ggml-metal/ggml-metal-context.m ggml/src/ggml-metal/ggml-metal-impl.h ggml/include/ggml-metal.h
343+
$(CC) $(CFLAGS) -c $< -o $@
330344
endif # LLAMA_METAL
331345

332346
ifneq ($(filter aarch64%,$(UNAME_M)),)
@@ -729,6 +743,7 @@ clean:
729743
rm -vf *.o main ttsmain sdmain whispermain quantize_gguf quantize_clip quantize_gpt2 quantize_gptj quantize_neox quantize_mpt vulkan-shaders-gen vulkan-shaders-gen-noext gguf-split mtmd-cli mainvk mainvk.exe mtmd-cli.exe gguf-split.exe vulkan-shaders-gen.exe vulkan-shaders-gen-noext.exe main.exe ttsmain.exe sdmain.exe whispermain.exe quantize_clip.exe quantize_gguf.exe quantize_gptj.exe quantize_gpt2.exe quantize_neox.exe quantize_mpt.exe koboldcpp_default.dll koboldcpp_failsafe.dll koboldcpp_noavx2.dll koboldcpp_clblast.dll koboldcpp_clblast_noavx2.dll koboldcpp_clblast_failsafe.dll koboldcpp_cublas.dll koboldcpp_hipblas.dll koboldcpp_vulkan.dll koboldcpp_vulkan_noavx2.dll koboldcpp_default.so koboldcpp_failsafe.so koboldcpp_noavx2.so koboldcpp_clblast.so koboldcpp_clblast_noavx2.so koboldcpp_clblast_failsafe.so koboldcpp_cublas.so koboldcpp_hipblas.so koboldcpp_vulkan.so koboldcpp_vulkan_noavx2.so ggml/src/ggml-vulkan-shaders.cpp ggml/src/ggml-vulkan-shaders.hpp ggml/src/ggml-vulkan-shaders-noext.cpp ggml/src/ggml-vulkan-shaders-noext.hpp
730744
rm -vrf ggml/src/ggml-cuda/*.o
731745
rm -vrf ggml/src/ggml-cuda/template-instances/*.o
746+
rm -vrf llguidance
732747

733748
# useful tools
734749
main: tools/main/main.cpp common/arg.cpp build-info.h ggml.o ggml-cpu.o ggml-ops.o ggml-vec.o ggml-binops.o ggml-unops.o llama.o console.o llavaclip_default.o llava.o ggml-backend_default.o ggml-backend-reg_default.o ggml-repack.o $(OBJS_FULL) $(OBJS)

0 commit comments

Comments
 (0)