Changes not commited by aider

This commit is contained in:
Álvaro González 2025-09-14 16:40:27 +02:00
parent 943436b9bb
commit 5e2acf39c3
3 changed files with 9 additions and 3 deletions

View file

@ -143,7 +143,7 @@ When multiple valid approaches exist, choose based on:
**NEVER**:
- Use `--no-verify` to bypass commit hooks
- Disable tests instead of fixing them
- Commit code that doesn't compile
- *Commit code yourself*
- Make assumptions - verify with existing code
**ALWAYS**:
@ -151,3 +151,4 @@ When multiple valid approaches exist, choose based on:
- Update plan documentation as you go
- Learn from existing implementations
- Stop after 3 failed attempts and reassess
- *Let the user commit changes*

View file

@ -51,10 +51,10 @@ class _UnitListState extends State<UnitList> {
final sampleFormula = Formula(
name: "Kinetic Energy",
input: [
VariableSpec(name: 'mass', magnitude: 'kilograms'),
VariableSpec(name: 'mass', magnitude: 'kilogram'),
VariableSpec(name: 'velocity', magnitude: 'meters_per_second'),
],
output: VariableSpec(name: 'energy', magnitude: 'joules'),
output: VariableSpec(name: 'energy', magnitude: 'joule'),
d4rtCode: "energy = 0.5 * mass * velocity * velocity;",
);

View file

@ -36,6 +36,11 @@ class UnitCorpus {
}
}
List<String> unitsOfSameMagnitude(String unit){
final base = this[unit].baseUnit;
return _baseToUnits[base] as List<String>;
}
UnitSpec operator [](String unit) {
if (!_allUnits.containsKey(unit)) {
throw ArgumentError("Unit not found:$unit");